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!