nginx: [error] invalid PID number "" in"/usr/local/nginx/logs/nginx.pid"

created at 07-06-2021 views: 2

description

After the nginx installation is successful, enter the command nginx, and the startup is successful.
But entering the commands nginx -s reload and nginx -s stop both prompt:

nginx: [error] invalid PID number "" in"/usr/local/nginx/logs/nginx.pid"

Invalid pid number

Solution

ps -ef | grep nginx

grep result

  • echo 6026> /usr/local/nginx/logs/nginx.pid
  • Re-enter the nginx -s reload and nginx -s stop commands at this time, and the restart and stop are successful.
Please log in to leave a comment.