access_log off

Jose Manuel Gonzalez Calvar listasjm at gmail.com
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/myweb.com/home;
   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/myweb.com;
            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
/var/www/html/myweb.com$fastcgi_script_name;
            fastcgi_intercept_errors on;
            #include        /usr/local/nginx/conf/fastcgi.conf;
        }

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

Does anybody if I can do it?

Thank you

Jose
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20070905/1d2d0695/attachment.html>


More information about the nginx mailing list