Skip to main content
 首页 » DevOps

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

2022年07月18日149落叶无声

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

启动Nginx出现这个错误

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

这里写图片描述 
解决方法:找到你的nginx.conf的文件夹目录,然后运行这个 
nginx -c /usr/local/etc/nginx/nginx.conf命令, 
再运行nginx -s reload,就可以了


本文参考链接:https://www.cnblogs.com/maohuidong/p/9501931.html