Welcome! Log In Create A New Profile

Advanced

Re: Not logging access to favicon.ico

Agus
January 17, 2013 05:54PM
location is only available in server block. Though you could create a file
with the location /favicon... and then include it in every server block
which will save you typing.





2013/1/17 Mik J <mikydevel@yahoo.fr>

> 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
>
_______________________________________________
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: 316
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready