Nginx installed after the general is to configure access log and error log, which access log we do not say here, you can refer to the previous article. Here is the main description of Nginx error log, this is known to all, open the log is mainly to troubleshoot problems.
1, error log level
Error_log level is divided into debug, info, notice, warn, error, crit default for Crit, the format is as follows:
Error_log/your/path/error.log Crit;
Crit Records have the fewest logs, and debug logs the most. Please choose the configuration log level according to the actual situation. The configuration level is low, too much information is useless, and the level is too high to easily troubleshoot problems. The recommendation remains the default.
2, error Log off
Error_log off or leave a comment, the error log will still be logged. If you need to completely shut down, you need to throw it into a black hole, for example:
Error_log/dev/null Crit;
3, Configuration segment: Main, HTTP, server, location.