Welcome! Log In Create A New Profile

Advanced

Re: custom 404 error_page seems to conflict with access_log off

António P. P. Almeida
February 26, 2012 06:10PM
On 26 Fev 2012 20h43 CET, gpakosz@yahoo.fr wrote:

This is what I usually employ for battling the dreaded missing favicon
error.

location = /favicon.ico {
access_log off;
try_files $uri @empty;
}

location @empty {
empty_gif; # send a in-memory 1x1 transparent GIF
}

If you prefer to just send a 204, do:

location = /favicon.ico {
access_log off;
try_files $uri =204;
}

HTH,
--- appa

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

custom 404 error_page seems to conflict with access_log off

gpakosz February 26, 2012 02:48PM

Re: custom 404 error_page seems to conflict with access_log off

Maxim Dounin February 26, 2012 03:58PM

Re[2]: custom 404 error_page seems to conflict with access_log off

Max February 26, 2012 05:18PM

Re: custom 404 error_page seems to conflict with access_log off

António P. P. Almeida February 26, 2012 06:10PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 128
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