That clears it up. Most of what I see in the error log is stuff I have no idea how to fix. I will Google some errors and see what is fixable. The deal is my websites work for me and I get no complaints.
Reading questions on the interwebs, most people get error messages when they use curl on their website. Now I never saw a post where someone intentionally causes an error with curl, but why not. Basically use curl to do something a bad browser would do.
Oh yeah I trap curl too. I used to see strange stuff in the log file from curl use so I put it in the map.
Maybe there is a test suite for this on GitHub.
Original Message
From: c@tunnel53.net
Sent: June 14, 2020 8:34 AM
To: nginx@nginx.org
Reply-to: nginx@nginx.org
Subject: Re: Force Nginx to log error?
> I'm not sure I understand the question, but how does this sound? I
> use a map to catch requests that I don't want. For instance I return
> a 444 if I receive a "wget".
No, I don’t mean status codes on the HTTP level. Status code 444 is
not an error per se that would be sent to the error log, it is a valid
status code sent from the server to the client. To the client that
might be considered an error, but not to Nginx.
I mean errors on a lower level, i.e. the level of the nginx daemon
itself.
E.g. stuff like this:
2020/06/14 13:13:59 [alert] 700#700: *998 open socket #13 left in connection 11
2020/06/14 13:13:59 [alert] 700#700: *4118 open socket #4 left in connection 13
2020/06/14 13:13:59 [alert] 700#700: *4169 open socket #17 left in connection 16
2020/06/14 13:13:59 [alert] 700#700: aborting
It would be useful to me to be able to trigger such messages, so that
I can verify that they are sent to the right destination.
E.g. if I have the following stanza in my config:
error_log /srv/nginx/error.log warn;
Then messages of the warn/error/crit/alert/emerg levels should be
logged and written to the file /srv/nginx/error.log (a file which is
separate from the access log).
I hope it is clearer now what I meant :)
_______________________________________________
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