nginx 错误open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory)


nginx 报错

open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory)

解决方案

1、进入nginx.conf的配置文件目录,一般在 usr/local/etc/nginx/下面

2、执行命令

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

如果没有权限请用sudo命令


评论