Home >Operation and Maintenance >Nginx >Where is the nginx log file?

Where is the nginx log file?

藏色散人
藏色散人Original
2019-08-08 10:07:5738470browse

Where is the nginx log file?

Where are the nginx log files?

nginx log file is under the path "/var/log/nginx", which refers to the default path of nginx log. Nginx logs are mainly divided into two types: access logs and error logs. The log switch is set in the Nginx configuration file (/etc/nginx/nginx.conf). Both logs can be selectively turned off, and both are turned on by default.

Related introduction:

Find the location of the configuration file Nginx.conf:

Execute sudo nginx -t to get the path to the configuration file.

At the same time, if your configuration file nginx.conf has errors after modification, there will be corresponding prompts after executing this command, such as "Invalid parameter"

For more Nginx related technical articles, please visit Nginx usage tutorial column to learn!

The above is the detailed content of Where is the nginx log file?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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