作者:钟z4z萍 | 来源:互联网 | 2023-08-06 11:55
解决nginx:[error]open()"usrlocalnginxlogsnginx.pid"failed错误问题描述:[root@localhostsbin
解决nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed错误
问题描述:
[root@localhost sbin]# ./nginx -s reload
nginx: [error] open() “/usr/local/nginx/logs/nginx.pid” failed (2: No such file or directory)
解决方案:
[root@localhost nginx]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
解释:
使用nginx -c的参数指定nginx.conf文件的位置