Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a strange problem with nginx, since the redmine application runs fine on redmine.nextrus.info, bit i also have redmine.nextrus.nl. The problem is, when i hit redmine.nextrus.nl the app loads but the css/javascript isn't loaded. When i look into the source of the page and paste the url to javascript/css files, they are there.. But they aren't loaded. When i hit redmine.nextrus.info, all is working well.

I tried to search the interwebs for a solution but couldn't find one, so i hope someone can help here...

This is my nginx.conf

http {
    include       /etc/nginx/mime.types;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;
    tcp_nodelay        on;

    gzip  on;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;
}

and this is my config for the subdomain:

upstream redmine {
  server unix:{path_to_thin}/thin.redmine.0.sock;
  server unix:{path_to_thin}/thin.redmine.1.sock;
}

server {
  server_name redmine.nextrus.info redmine.nextrus.nl;
  root {path_to_redmine}/redmine/public;

  access_log  {path_to_logs}/redmine-access.log;
  error_log {path_to_logs}/redmine-error.log;

  location / {
    try_files $uri @ruby;
  }

  location @ruby {
    proxy_set_header  X-Real-IP  $remote_addr;
    proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header  Host $http_host;
    proxy_redirect off;
    proxy_read_timeout 300;
    proxy_pass http://redmine;
  }
}

When you need some more information, just ask, i will edit this post with the additional information.

[EDIT] The access log: (error log was empty) [snip]

83.86.91.16 - - [24/Jul/2011:10:45:07 +0000] "GET /stylesheets/application.css?1310384844 HTTP/1.1" 304 0 "http://redmine.nextrus.info/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko
) Ubuntu/10.10 Chromium/12.0.742.112 Chrome/12.0.742.112 Safari/534.30"
83.86.91.16 - - [24/Jul/2011:10:45:07 +0000] "GET /javascripts/prototype.js?1310384844 HTTP/1.1" 304 0 "http://redmine.nextrus.info/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko) U
buntu/10.10 Chromium/12.0.742.112 Chrome/12.0.742.112 Safari/534.30"
83.86.91.16 - - [24/Jul/2011:10:45:07 +0000] "GET /javascripts/effects.js?1310384844 HTTP/1.1" 304 0 "http://redmine.nextrus.info/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko) Ubu
ntu/10.10 Chromium/12.0.742.112 Chrome/12.0.742.112 Safari/534.30"
83.86.91.16 - - [24/Jul/2011:10:45:07 +0000] "GET /javascripts/dragdrop.js?1310384844 HTTP/1.1" 304 0 "http://redmine.nextrus.info/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko) Ub
untu/10.10 Chromium/12.0.742.112 Chrome/12.0.742.112 Safari/534.30"
83.86.91.16 - - [24/Jul/2011:10:45:07 +0000] "GET /javascripts/controls.js?1310384844 HTTP/1.1" 304 0 "http://redmine.nextrus.info/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko) Ub
untu/10.10 Chromium/12.0.742.112 Chrome/12.0.742.112 Safari/534.30"
83.86.91.16 - - [24/Jul/2011:10:45:07 +0000] "GET /javascripts/application.js?1310384844 HTTP/1.1" 304 0 "http://redmine.nextrus.info/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko)
 Ubuntu/10.10 Chromium/12.0.742.112 Chrome/12.0.742.112 Safari/534.30"
83.86.91.16 - - [24/Jul/2011:10:45:07 +0000] "GET /stylesheets/scm.css?1310384844 HTTP/1.1" 304 0 "http://redmine.nextrus.info/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko) Ubuntu
/10.10 Chromium/12.0.742.112 Chrome/12.0.742.112 Safari/534.30"
83.86.91.16 - - [24/Jul/2011:10:45:10 +0000] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko) Ubuntu/10.10 Chromium/12.0.742.112 Chrome/12.0.742.112 Safari/5
34.30"
83.86.91.16 - - [24/Jul/2011:10:45:12 +0000] "GET / HTTP/1.1" 200 3707 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko) Ubuntu/10.10 Chromium/12.0.742.112 Chrome/12.0.742.112 Safar
i/534.30"
83.86.91.16 - - [24/Jul/2011:10:45:12 +0000] "GET / HTTP/1.1" 200 3707 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko) Ubuntu/10.10 Chromium/12.0.742.112 Chrome/12.0.742.112 Safar
i/534.30"
83.86.91.16 - - [24/Jul/2011:10:45:12 +0000] "GET /javascripts/application.js?1310384844 HTTP/1.1" 200 10163 "http://redmine.nextrus.nl/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Geck
o) Ubuntu/10.10 Chromium/12.0.742.112 Chrome/12.0.742.112 Safari/534.30"
83.86.91.16 - - [24/Jul/2011:10:45:12 +0000] "GET /stylesheets/application.css?1310384844 HTTP/1.1" 200 37363 "http://redmine.nextrus.nl/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gec
ko) Ubuntu/10.10 Chromium/12.0.742.112 Chrome/12.0.742.112 Safari/534.30"
83.86.91.16 - - [24/Jul/2011:10:45:12 +0000] "GET /javascripts/effects.js?1310384844 HTTP/1.1" 200 38675 "http://redmine.nextrus.nl/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko) U
buntu/10.10 Chromium/12.0.742.112 Chrome/12.0.742.112 Safari/534.30"
83.86.91.16 - - [24/Jul/2011:10:45:12 +0000] "GET /javascripts/dragdrop.js?1310384844 HTTP/1.1" 200 31103 "http://redmine.nextrus.nl/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko) 
Ubuntu/10.10 Chromium/12.0.742.112 Chrome/12.0.742.112 Safari/534.30"
83.86.91.16 - - [24/Jul/2011:10:45:12 +0000] "GET /javascripts/controls.js?1310384844 HTTP/1.1" 200 34716 "http://redmine.nextrus.nl/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko) 
Ubuntu/10.10 Chromium/12.0.742.112 Chrome/12.0.742.112 Safari/534.30"
83.86.91.16 - - [24/Jul/2011:10:45:12 +0000] "GET /stylesheets/scm.css?1310384844 HTTP/1.1" 200 6947 "http://redmine.nextrus.nl/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko) Ubunt
u/10.10 Chromium/12.0.742.112 Chrome/12.0.742.112 Safari/534.30"
83.86.91.16 - - [24/Jul/2011:10:45:12 +0000] "GET /javascripts/prototype.js?1310384844 HTTP/1.1" 200 165673 "http://redmine.nextrus.nl/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko
) Ubuntu/10.10 Chromium/12.0.742.112 Chrome/12.0.742.112 Safari/534.30"

[/EDIT]

Thanks in advance

[EDIT2] See comments for the solution, but it is fixed. [/EDIT2]

share|improve this question
    
Logs. We need logs. –  womble Jul 24 '11 at 10:20
    
Added the logs :) –  Bloeper Jul 24 '11 at 10:56
    
Can you annotate those logs? Also, a packet dump of the requests made for each page, showing the HTTP request/response, might help narrow it down. –  womble Jul 24 '11 at 10:59
    
Fixed! turns out i needed to add root {redmine_path}/public to the location / also... Now it works like a charm :) Thanks for the input though :) –  Bloeper Jul 24 '11 at 11:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.