nginx mac invalid pid?



我刚刚安装了nginx。我现在试图使用日志文件夹中的pid文件来停止它但它告诉我它是illegal process id: cat /usr/local/logs/nginx.pid

我运行的命令是:sudo kill 'cat /usr/local/logs/nginx.pid'

pid是15597,但在活动监视器中,我也没有看到具有该ID的进程。当我输入:ps ax | grep nginx时,我得到:

15597   ??  Ss     0:00.00 nginx: master process nginx
15883   ??  S      0:00.00 nginx: worker process
15898 s000  R+     0:00.00 grep nginx

谢谢

尝试直接终止进程:

kill 15597

或者你可以尝试在usr/local/etc/nginx中启动nginx脚本:

nginx -s quit

您可能需要根据您的安装调整路径

最新更新