Static Files not serving

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.


On Mon, Feb 11, 2008 at 11:40:46PM -0800, Dave Dash wrote:

            root   /var/www/django/onyx/static;

Look in error_log. Probably, you should do

  •             root   /var/www/django/onyx/static;
  •             root   /var/www/django/onyx;