search

Home  >  Q&A  >  body text

nginx startup error: nginx -s relaod, please solve it, thank you!

centos is compiled and started: nginx -s reload. The error is reported as follows: Why is this happening?

      invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"
世界只因有你世界只因有你2754 days ago786

reply all(4)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-05-16 17:13:59

    Just start and run nginx directly, no need to add signal

    There is no need to add the -s parameter, -s is a signal, and reload is to reload the configuration file.

    reply
    0
  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-16 17:13:59

    Start nginx

    If your nginx configuration file is in /etc/nginx/nginx.conf,启动nginx就可以nginx -c /etc/nginx/nginx.conf

    nginx signal

    nginx -s is to send a signal to nginx
    nginx -s stop to stop immediately
    nginx -s quit to stop gracefully
    nginx -s reload to reread the configuration file

    reply
    0
  • 阿神

    阿神2017-05-16 17:13:59

    Delete the pid file in the corresponding directory, and then nginx start

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-16 17:13:59

    Execute the following command

    kill -9 $(pgrep nginx)
    nginx
    

    First, kill the started nginx process, and then directly execute the nginx command to restart nginx.

    reply
    0
  • Cancelreply