Nginx static file deletion

Steve Zhuo lists at ruby-forum.com
Fri Jul 22 03:02:46 UTC 2011


hi.

I found out recently that everytime i restart my nginx, nginx is trying
to delete the static directory and everything under it. following is my
static directory configuration:


http{

....

  proxy_cache_path /path/to/static levels=1:2 keys_zone=one:60m
inactive=3d max_size=100m;
  proxy_temp_path /tmp/cache;


 location ~*
(\.txt$|\.ico$|\.css$|\.js$|\.png$|\.gif$|\.jpg$|\.jpeg$|\.json$|\.xml$|\.zip$|\.html$)
{



           root /path/to/static;
           proxy_cache one;
           proxy_cache_key     www.website.com$request_uri;
           proxy_cache_valid   200 1h;
           proxy_cache_use_stale   error timeout invalid_header;
           access_log /var/log/nginx/access.log;
           error_log /var/log/nginx/error.log;
           expires 7d;
        }

}

this is the only place where i point to the static directory.

any help is appreciated.


Thank You

Steve Zhuo

-- 
Posted via http://www.ruby-forum.com/.



More information about the nginx mailing list