nginx: [error] open() “/usr/local/nginx/logs/nginx.pid” failed (2: No such file or directory)
This error is: the pid file is missing in the logs directory.
Solution: Re-specify the configuration file loaded at startup, and then restart. If the nginx configuration file directory is: /usr/local/nginx/conf/nginx.conf
First execute the command: /usr/local/nginx/sbin/nginx -c/usr/local/nginx/conf/nginx.conf
Then: /usr/local/nginx/sbin/nginx -s reload for smooth restart, no error will be reported