解决nginx reload失败

时间:2024-10-14 20:07:32

1. 失败提示信息

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

2. 解决方法

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

使用nginx -c的参数指定nginx.conf文件的位置

提示:nginx: [emerg] bind() to 0.0.0.0: failed (: Address already in use)
killall - nginx 杀掉nginx 进程 然后重启就行了。 service nginx restart

相关文章