nginx: [emerg] open() "/var/run/nginx/nginx.pid" failed (2: No such file or dire
程序员文章站
2022-03-24 11:03:48
...
启动nginx报错
写道
nginx: [emerg] open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory)
因为centos7(估计所有linux)下,创建了/var/run/nginx/目录存放nginx.pid,每次重启后,/var/run目录下都会清空。
修改vi nginx.conf
写道
#pid logs/nginx.pid;
pid /export/servers/nginxlog/nginx.pid;
pid /export/servers/nginxlog/nginx.pid;
目录随便定,再启动就可以了
上一篇: 成功页面返回到固定某页面
下一篇: 一点经验