Home  >  Article  >  Operation and Maintenance  >  Introduction to nginx common errors and solutions

Introduction to nginx common errors and solutions

王林
王林forward
2020-11-19 14:50:235580browse

Introduction to nginx common errors and solutions

Common errors and solutions in nginx are:

Error 1:

nginx: [error] CreateFile() "C:\mytools\nginx-1.8.1/logs/nginx.pid" failed (2: The system cannot find the file specified)

or

nginx: [error] Open() "C:\mytools\nginx-1.8.1/logs/nginx.pid" failed

Solution:

Use the command to create the /logs/nginx.pid file

nginx -c conf/nginx.conf

Error two:

nginx: [alert] could not open error log file: CreateFile() "logs/error.log" failed (3: The system cannot find the path specified)
 [emerg] : invalid number of arguments in "root" directive in C:\mytools\nginx-1.8.1\conf\nginx.conf:45

Solution:

Configuration file root When specifying a directory, the end cannot be "\".

Related recommendations: nginx tutorial

The above is the detailed content of Introduction to nginx common errors and solutions. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:cnblogs.com. If there is any infringement, please contact admin@php.cn delete