Welcome! Log In Create A New Profile

Advanced

Not logging access to favicon.ico

January 17, 2013 04:38PM
Hello,


I'm really new to Nginx so forgive me if this question seems obvious to you.

I have Nginx with virtual hosts. In my nginx.conf I have
http {
....
 include /etc/nginx/sites-enabled/*;
....

In /etc/nginx/sites-enabled/ I have my configuration such as default

server {
        listen 80 default_server;
        server_name _;
        index index.html;
        root /var/nginx/html;
        access_log /var/log/nginx/default.access.log;
}


I would like all my virtual hosts to have some global properties such as
location = /favicon.ico {
return 204;
access_log off;
log_not_found off;
}
so that I won't log access and errors relative to favicon.ico

But it's not clear to me, where I should put this statement in order to have a minimalistic configuration.


Thank you


_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Not logging access to favicon.ico

miky January 17, 2013 04:38PM

Re: Not logging access to favicon.ico

Agus January 17, 2013 05:54PM

Re: Not logging access to favicon.ico

Jonathan Matthews January 17, 2013 06:24PM

Re: Not logging access to favicon.ico

miky January 18, 2013 03:02AM

Re: Not logging access to favicon.ico

Mark Alan January 18, 2013 06:10AM

答复: Not logging access to favicon.ico

cfsego January 22, 2013 10:36PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 84
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 254 on July 05, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready