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

根因,机器重启或者服务重启或者机器安装过多次nginx,导致nginx去找默认文件/var/run/nginx.pid。而实际上,这个文件在一顿折腾中不见了,需要重新指定nginx的运行配置文件

sudo nginx -c /etc/nginx/nginx.conf
nginx -s reload

猜你喜欢

转载自blog.csdn.net/u010264186/article/details/108347714