error.log file doesn't log "404 File Not Found" errors

Jonathan Matthews contact at jpluscplusm.com
Thu Jul 4 12:27:21 UTC 2013


On 3 July 2013 23:27, BSD Kazakhstan <bsdkazakhstan at gmail.com> wrote:
> My error.log doesn't show any request/log based on .php requests,
> i.e. when I type /test.php (file doesn't exist), error.log doesn't show
> anything regarding it.
> Shouldn't nginx log this request inside error.log as 404 Not Found?

No. 404s are logged in whatever access_log you have configured.

Generally, any new lines in error.log represent a problem that the
hoster (sysadmin/app-dev/etc) should look at.
A 404 is (or can be) a client-side error, hence should be logged
elsewhere. Which it is.

J



More information about the nginx mailing list