Welcome! Log In Create A New Profile

Advanced

Re: Not logging access to favicon.ico

Mark Alan
January 18, 2013 06:10AM
On Fri, 18 Jan 2013 08:00:54 +0000 (GMT), Mik J <mikydevel@yahoo.fr>
wrote:
> Thank you guys, so I'll put a somilar configuration as below for all
> my virtual hosts: # cat /etc/nginx/sites-available/default
> server {
>         listen 80 default_server;
>         server_name _;
>         index index.html;
>         root /var/nginx/html;
>         access_log /var/log/nginx/default.access.log;
>
>         location /favico {
>         access_log off;
>         error_log /dev/null crit;
>         empty_gif;
>         }
> }

There is no need to use the 'empty_gif' blob or the related
ngx_http_empty_gif_module anymore.

Try this instead:

location = /favicon.ico { access_log off; log_not_found off; expires
30d; try_files /favicon.ico =204; }

Regarding that 204 status code, do see:
https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#204

r.

M

_______________________________________________
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: 240
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