[Solved] Nginx Restart Error: /run/nginx.pid failed (2: No such file or directory)

Nginx重启失败/run/nginx.pid failed (2: No such file or directory)

When deploying the project, an error is reported when restarting the nginx server after configuring the open port configuration

Go to the /run directory and find that there is no nginx.pid file.

Solution: enter etc/nginx/conf/nginx.conf file and modify the location of pid as below:

Read More: