Welcome! Log In Create A New Profile

Advanced

Re: 404 not showing up in error logs (for PHP files)

February 10, 2014 10:27AM
We solved this problem like this:

try_files $uri $uri-404;

This would first check if the php file exists, and if not it would try to open that same php file but with "-404" appended to it, so the user would still get a 404 status code, but it would also log what file was called. I hope this helps.

P.S. Sorry for replying to this topic 2 years later, but this is one of the topics that come out when you search for this issue and I think it is usefull that there is an easy solution.
Subject Author Posted

404 not showing up in error logs (for PHP files)

Ilan Berkner January 05, 2012 12:06PM

Re: 404 not showing up in error logs (for PHP files)

Falko Timme January 05, 2012 05:04PM

Re: 404 not showing up in error logs (for PHP files)

Francis Daly January 05, 2012 06:34PM

Re: 404 not showing up in error logs (for PHP files)

Ilan Berkner January 05, 2012 06:38PM

Re: 404 not showing up in error logs (for PHP files)

Maxim Dounin January 07, 2012 06:38AM

Re: 404 not showing up in error logs (for PHP files)

kustodian February 10, 2014 10:27AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 54
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready