nginx: [error] invalid PID number 亲测有效
解决办法
解决办法直接关闭nginx进程,然后再重新启动nginx
- 查看nginx的进程号:
ps -ef | grep nginx
查询出的nginx第二列就是nginx的进程号
root 7442 1 0 Jun04 ? 00:00:00 nginx: master process nginx
nginx 17735 7442 0 02:31 ? 00:00:00 nginx: worker process
root 17801 32123 0 02:31 pts/1 00:00:00 grep --color=auto nginx
- 关闭对应进程
kill signal 17735
这里会报错,
bash: kill: signal: arguments must be process or job IDs
但是nginx的确是被关闭了
然后再重启nginx
nginx