access_log off

Jose Manuel Gonzalez Calvar listasjm at
Wed Sep 5 15:08:16 MSD 2007

Hello everybody.

I'd like to desactivate all logs for a directory in my web, the problem is
that this is dinamic and fastcgi is  who serves it.
I try to insert the second location like:

location /home {
   root /var/www/html/;
   index index.htm;
   access_log off;


But when I watch the log I see requests to home/. I'd like not  writing it.

My example configuration with the location I try to insert:

access_log  /var/log/nginx/access.log  main;

         location  / {
            root   /var/www/html/;
            index  index.html index.htm;

 location ~ \.php$|\.htm$ {
            #fastcgi_pass   localhost:10005;
            fastcgi_pass   unix:/tmp/nginx-fcgi;
            fastcgi_index  index.htm;
            fastcgi_param  SCRIPT_FILENAME
            fastcgi_intercept_errors on;
            #include        /usr/local/nginx/conf/fastcgi.conf;

location ~* ^.+\.(jpg|jpeg|gif|png|css|js)$ {
                root         /var/www/html/;
                access_log   off;
                expires      30d;

Does anybody if I can do it?

Thank you

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list