Static Files not serving

Dave Dash dd at
Tue Feb 12 10:40:46 MSK 2008

I have an nginx conf as such:

server {
         listen   80;
         access_log  /var/log/nginx/onyx.access.log;
         error_log /var/log/nginx/onyx.error.log;

         location /static {
                 root   /var/www/django/onyx/static;
                 access_log   off;
                 expires      30d;

         location / {
                 # host and port to fastcgi server
                 fastcgi_param PATH_INFO $fastcgi_script_name;
                 fastcgi_param REQUEST_METHOD $request_method;
                 fastcgi_param QUERY_STRING $query_string;
                 fastcgi_param SERVER_NAME $server_name;
                 fastcgi_param SERVER_PORT $server_port;
                 fastcgi_param SERVER_PROTOCOL $server_protocol;
                 fastcgi_param CONTENT_TYPE $content_type;
                 fastcgi_pass_header Authorization;
                 fastcgi_intercept_errors off;

But none of my static assets are being served.  They get a 404  
error.  Is their something I'm missing, I tried location ^~ /static  
as well and that didn't work.


More information about the nginx mailing list