nginx 启动报错 “/var/run/nginx/nginx.pid" failed” 解决方法

参考:http://www.javashuo.com/article/p-dzcxkfda-cp.htmlhtml

问题描述:nginx

重启Nginx报错, nginx: [emerg] open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory)。测试

解决方法:spa

第一步、在 /usr/local/nginx 目录下建立 logs 目录:mkdir /usr/local/nginx/logs3d

第二步、进入 cd /usr/local/nginx/conf/ 目录,编辑配置文件nginx.conf ;htm

 

第三步、在配置文件中有个注释的地方: #pid        logs/nginx.pid;
而后复制,粘贴到一下行,修改一下配置。
blog

第四步、启动nginx服务:/usr/local/nginx/sbin/nginx进行测试,看是否正常系统。get

 

 

待续......配置

相关文章
相关标签/搜索