Restart the server and access the web service! Log on to the server and use nginx. /nginx-s reload: re-read the configuration file and nginx: [error] open () "/usr/local/nginx/logs/nginx is reported. pid "failed (2: No such file or directory) error. Go to the logs file and find that nginx does not exist. pid file
[Root @ localhost sbin] #./nginx-s reload
Nginx: [error] open () "/usr/local/nginx/logs/nginx. pid" failed (2: No such file or directory)
Solution:
[Root @ localhost nginx] #/usr/local/nginx/sbin/nginx-c/usr/local/nginx/conf/nginx. conf
Use the nginx-c parameter to specify the location of the nginx. conf file
[Root @ localhost nginx] # cd logs/
[Root @ localhost logs] # ll
Total usage 12
-Rw-r -- 1 root 1246 December 9 18:10 access. log
-Rw-r -- 1 root 516 December 10 15:39 error. log
-Rw-r -- 1 root 5 December 10 15:38 nginx. pid
Check that the nginx. pid file already exists. If an error persists, run the following statement:
/Usr/local/nginx/sbin/nginx-c/usr/local/nginx/conf/nginx. conf
/Usr/local/nginx/sbin/nginx-s reload
Another important possibility is ps-ef | grep nginx. Check where the main directory is installed with two hateful Nginx. Haha nginx