返回官网

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

狒狒 2017-4-17 Linux 674 次
使用./nginx -s reload重新读取配置文件,发现报nginx: [error] open() /usr/local/nginx/logs/nginx.pid failed (2: No such file or directory)错误,进到logs文件发现没有nginx.pid文件

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

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

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

发表评论

Copyright © 2016 DEWEBSTUDIO