1. 程式人生 > >nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed

nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed

./nginx -s reload

當使用以上命名重啟nginx時,發現丟擲異常

nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)

原因是nginx.pid檔案不存在


解決方法:

./usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

執行上面命令即可