解决方案

1
2
3
4
5
6
# 强制停止 ngxin 服务 会删除 logs下的pid文件
./nginx -s stop
# 手动重新配置文件
./nginx -c /usr/local/nginx/conf/nginx.conf
# 重启即可
./nginx -s reload

注:
设置完配置路径并重启后,后续服务重启工作不需要 stop 指令后 start ,后续重新配置完 confg 后 直接 reload 就行, 避免又重现上述问题!