Restart nginx:/usr/local/nginx/sbin/nginx-s reload
Error code:Nginx: [error] open () "/usr/local/nginx/logs/nginx. pid" failed (2: No such file or directory) (as shown below)
Solution:
1. Run/usr/local/nginx/sbin/nginx again.
2. Restart nginx:/usr/local/nginx/sbin/nginx-s reload
Some of the above solutions can be solved by some friends, but most of the data cannot be solved, so google searches
Take a look
Issued a nginx-s stop and after that I got this error when trying to reload it.
[Error]: invalid PID number "" in "/var/run/nginx. pid"
That/var/run/nginx/pid file is empty atm.
What do I need to do to fix it?
Nginx-s reload is only used to tell a running nginx process to reload its config. after a stop, you don't have a running nginx process to send a signal. just run nginx (possibly with a-c/path/to/config/file)
So I used this method, that is
Nginx-c/path/to/config/file) // This is the case on my machine:/alidata/server/nginx/sbin/nginx-c/alidata/server/nginx/conf/nginx. conf