使用/usr/local/nginx/sbin/nginx -s reload 重新读取配置文件出错
[[email protected] nginx]/usr/local/nginx/sbin/nginx -s reload
提示 nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"
[[email protected] nginx]# cd logs
[[email protected] logs]# ls
access.log error.log nginx-access.log nginx_error.log
果然没有/usr/local/nginx/logs/nginx.pid 文件
解决方法:用指定文件加载nginx配置文件
[[email protected] nginx]/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
原文地址:https://www.cnblogs.com/link01/p/12050567.html
时间: 2024-10-14 22:00:33