First i want to state that i have read and tried solutions from all SO questions i found on the subject.
Nothing helped, but also my issue is quite different than usual one.
I have django project which i have installed on my dev computer where it works (either on runserver and gunicorn), meaning that staticfiles are served.
Its worth mentioning that i recently due to hardware issues migrated my development environment to fresh system (takeaway here is that i recently installed this project).
When i try to install it on the other system (fresh install of ubuntu 13.10 for which my installation script has been written) i experience this strange problem that not all of the static files are served by nginx.
'Not all' means that some of the css files are served, some aren't; same goes for js.
And yes all of them files are in the same static dir, and yes all of them are actually there. Also it probably isn't configuration issue since in both cases (my dev machine where everything runs fine and this test one where doesn't) there is exact same configuration. Also privilages for files are all the same. There's nothing in nginx's logs.
It must be either something very silly yet exotic or i don't know... voodoo ? I mean, i would manage if nginx wouldn't serve anything - that would be obviously some error - but how come that one file is served while another from exact same place doesn't ? Also how it is possible that the same setup serves all files on one system while only few on the other?
I didn't include no configs and such here since, as i stated above, i don't think they are issue here; however if someone feel need to assure himself im eager to post it, just say a word.
Thanks in advance guys and i beg for help, im desperate and not ashamed of it.
It's been three days already and deadline isn't going anywhere...
My /etc/nginx/nginx.conf (basically default one):
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/x-javascript text/xmlapplication/xml applicatio
##
# nginx-naxsi config
##
# Uncomment it if you installed nginx-naxsi
##
#include /etc/nginx/naxsi_core.rules;
##
# nginx-passenger config
##
# Uncomment it if you installed nginx-passenger
##
#passenger_root /usr;
#passenger_ruby /usr/bin/ruby;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}
Site config from sites-enabled:
server {
listen 80;
server_name webapp.org;
access_log /var/log/nginx_access.log;
error_log /var/log/nginx_error.log;
location /static {
root /home/myuser/app;
}
location /sse {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_buffering off;
proxy_next_upstream error;
proxy_read_timeout 600;
proxy_pass http://127.0.0.1:8888;
}
location /pacs {
proxy_pass http://127.0.0.1:8080/;
}
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://127.0.0.1:8888;
}
}