使用/usr/local/nginx/sbin/nginx -s reload 重新读取配置文件出错
[root@localhost nginx]/usr/local/nginx/sbin/nginx -s reload
提示 nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"
[root@localhost nginx]# cd logs
[root@localhost logs]# ls
access.log error.log nginx-access.log nginx_error.log
果然没有/usr/local/nginx/logs/nginx.pid 文件
解决方法:
[root@localhost nginx]/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
原文:https://blog.csdn.net/cxs123678/article/details/80201412