0

The version that I'm using:

  Redmine version                          2.0.1.stable
  Ruby version                             1.8.7 (i386-linux)
  Rails version                            3.2.3
  Environment                              production
  Database adapter                         MySQL

The strange thing is after pressing Ctrl+F5 a few times, I will get something like this:

enter image description here

I can't find any interesting in the production.log:

Started GET "/admin/info" for 192.168.3.40 at Sat Jun 23 21:14:50 +0700 2012 
Processing by AdminController#info as HTML 
  Rendered admin/info.html.erb within layouts/admin (2.2ms) 
  Rendered admin/_menu.html.erb (7.8ms) 
  Rendered layouts/base.html.erb (72.9ms) 
Completed 200 OK in 93ms (Views: 79.1ms | ActiveRecord: 8.3ms) 

/etc/httpd/conf.d/passenger.conf

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.12
PassengerRuby /usr/bin/ruby

/etc/httpd/conf.d/vhost.conf

<VirtualHost *:80>
    ServerName  redmine.domain.vn
    ServerAdmin quanta@domain.vn
    DocumentRoot /var/www/html/redmine/public/
    RailsBaseURI /  
    ErrorLog logs/redmine.error_log

    <Directory "/var/www/html/redmine/public/">
        Options -MultiViews
        Order allow,deny
        Allow from all
        AllowOverride none
        Satisfy Any
    </Directory>
</VirtualHost>

There is no .htaccess file in the public folder that might cause the problems with passenger:

ls -la /var/www/html/redmine/public/

-rw-rw-r--  1 apache apache  485 May 28 14:25 404.html
-rw-rw-r--  1 apache apache  674 May 28 14:25 500.html
-rwxr-xr-x  1 apache apache  473 Jun  2 11:34 dispatch.fcgi
-rwxrwxr-x  1 apache apache  473 May 28 14:25 dispatch.fcgi.example
-rw-rw-r--  1 apache apache 7886 May 28 14:25 favicon.ico
drwxrwxr-x  2 apache apache 4096 May 28 14:25 help
-rw-rw-r--  1 apache apache 1441 May 28 14:25 htaccess.fcgi.example
drwxrwxr-x  4 apache apache 4096 May 28 14:25 images
-rw-r--r--  1 apache apache   20 Jun 23 18:59 info.php
drwxrwxr-x  4 apache apache 4096 May 28 14:25 javascripts
drwxrwxr-x  2 apache apache 4096 May 28 14:25 stylesheets
drwxrwxr-x  4 apache apache 4096 May 28 14:25 themes

Any thoughts?


UPDATE Sat Jun 23 22:50:44 ICT 2012

The source when missing CSS:

<link href="/themes/classic/stylesheets/I.application.css,q1338189946.pagespeed.cf.0ULULhmylO.css" media="all" rel="stylesheet" type="text/css"/>

<script src="/javascripts/prototype.js,q1338189946.pagespeed.jm.ix8Kb1Gh8H.js" type="text/javascript"></script>
<script src="/javascripts/effects.js,q1338189946.pagespeed.jm.2gOWX1ohLv.js" type="text/javascript"></script>
<script src="/javascripts/dragdrop.js,q1338189946.pagespeed.jm.vpl0THRgUC.js" type="text/javascript"></script>
<script src="/javascripts/controls.js,q1338189946.pagespeed.jm.-zBskbSR2S.js" type="text/javascript"></script>
<script src="/javascripts/rails.js,q1338189946.pagespeed.jm.unwctb3Jeq.js" type="text/javascript"></script>
<script src="/javascripts/application.js,q1338189946.pagespeed.jm.Su1eFnevwF.js" type="text/javascript"></script>

and this shows the page with CSS:

<link href="/themes/classic/stylesheets/application.css?1338189946" media="all" rel="stylesheet" type="text/css"/>

<script src="/javascripts/prototype.js?1338189946" type="text/javascript"></script>
<script src="/javascripts/effects.js?1338189946" type="text/javascript"></script>
<script src="/javascripts/dragdrop.js?1338189946" type="text/javascript"></script>
<script src="/javascripts/controls.js?1338189946" type="text/javascript"></script>
<script src="/javascripts/rails.js?1338189946" type="text/javascript"></script>
<script src="/javascripts/application.js?1338189946" type="text/javascript"></script>

Where these weird characters that cause the wrong href and src path come from?

quanta
  • 3,960
  • 4
  • 40
  • 75
  • 1
    View page source in the browser. Is there any valid CSS? – vlain Jun 23 '12 at 15:14
  • It shows the wrong `href` and `src` path. Updated my question. – quanta Jun 23 '12 at 16:04
  • weird chars are timestamp used for caching static files. It is only an admin/info issue? – vlain Jun 23 '12 at 16:14
  • Pay more attention to the path: `I.application.css,q1338189946.pagespeed.cf.0ULULhmylO.css` vs `application.css?1338189946`, `,q1338189946.pagespeed.jm.ix8Kb1Gh8H.js` vs `?1338189946`. No, it happens with every page after pressing Ctrl+F5 a few time. – quanta Jun 23 '12 at 18:53

1 Answers1

1

It seems that the culprit is... mod_pagespeed. I see the below error when turning on the Firebug:

"NetworkError: 500 Internal Server Error - http://redmine.domain.vn/javascripts/prototype.js,q1338189946.pagespeed.jm.ix8Kb1Gh8H.js"

Disable it and now Redmine is working fine:

<VirtualHost *:80>
    ServerName  redmine.domain.vn
    ServerAdmin quanta@domain.vn
    DocumentRoot /var/www/html/redmine/public/
    RailsBaseURI /  
    ErrorLog logs/redmine.error_log

    ModPagespeed off

    <Directory "/var/www/html/redmine/public/">
        Options -MultiViews
        Order allow,deny
        Allow from all
        AllowOverride none
        Satisfy Any
    </Directory>
</VirtualHost>
quanta
  • 3,960
  • 4
  • 40
  • 75
  • Any other possible solutions? I'm having a similar [issue](http://stackoverflow.com/questions/39521382/redmine-3-3-0-stylesheets-not-included-in-application-css) with css missing. But I do not use passenger. I'm using xampp. Thank you! – Adrian Moisa Sep 16 '16 at 07:43