nginx: [error] open() “/usr/local/nginx/logs/nginx.pid“ failed (2: No such file or directory)

A server’s back end is not a good front end

Today, the operation and maintenance colleagues changed the server password. They said that they changed the password regularly for security. Ah bah ~ this password has not been changed for several years. There are too many services here. After changing, many places have to be changed. It’s a lot of trouble

The O & M said that the machine was restarted, and then the nginx service was shut down and needed to be restarted

Restart command first (two commands)

cd /usr/local/nginx/sbin
./nginx -s reload

Then he reported a mistake

 

 

  It’s no small matter. Look at the configuration file,

vim /usr/local/nginx/conf/nginx.conf

 

Find PID and find it annotated. Remove it and restart it again

Then I was too young. How could I solve a problem with my bug maker, and then remember that I didn’t specify the configuration directory

Then execute the command

sudo /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

Then restart it. Be sure to watch the directory

 

 

 

Similar Posts: