nginx: [error] open() “/var/run/nginx.pid“ failed (2: No such file or directory)

The root cause is that the machine restarts or the service restarts, or the machine has been installed with nginx multiple times, causing nginx to find the default file /var/run/nginx.pid. In fact, this file disappeared in a tossing meal, and you need to re-specify the nginx running configuration file

sudo nginx -c /etc/nginx/nginx.conf
nginx -s reload

Guess you like

Origin blog.csdn.net/u010264186/article/details/108347714