How to close error_log log in nginx

王林
Release: 2023-05-16 18:01:13
forward
1350 people have browsed it

Configuration parameter format: error_log /path/to/log level;

Nginx error log level

Common error log levels include debug | info | notice | warn | error | crit | alert | emerg

The higher the level, the less information is recorded. If not defined, the default level is error.

It can be configured in main, http, server, location paragraph.

If two error_logs are defined in the configuration file, they will conflict in the same configuration section, so only one error_log is allowed to be configured in the same section.

However, it is okay to appear in different configuration sections.

Nginx error log example

error_log /var/log/nginx/error.log crit;
Copy after login

If you want to completely close error_log, you need to configure it like this

error_log /dev/null;
Copy after login

The above is the detailed content of How to close error_log log in nginx. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template