Py学习  »  NGINX

Nginx报错 nginx: [error] open() “/run/nginx.pid“ failed (2: No such file or directory)

BluthLeee • 3 年前 • 181 次点击  

问题

修改nginx.conf配置后,输入 sbin/nginx -s reload ,结果报错 nginx: [error] open() "/run/nginx.pid" failed (2: No such file or directory)

解决办法

网上的办法,大多针对 “nginx: [error] open() "/run/nginx.pid" failed (2: No such file or directory)”
说实话,可能有用,但是我这改了好久都不行。。。

我的问题是nginx.conf配置文件写错了,并不是在其他的地方去作修改
在这里插入图片描述
如图,root后面应该是 /data/www/KeyProject ,而我写的是 data/www/KeyProject ,它报错的位置没有准确道这一行,所以我找了半天都没发现。这是个大坑呀。。。

Nginx.conf文件一定得小心,它报错的位置不一定准确

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/74837
 
181 次点击