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

alpine报错 nginx: [error] open() "/run/nginx/nginx.pid" failed (2: No such file or directory)

原因是:没有nginx.pid 这个文件,每次当我们停止nginx时(nginx -s stop) ,nginx 会把 /run/nginx/ 路径下名为nginx.pid 的文件删掉

所以我们要启动一下nginx 会重新生成 nginx.pid文件

nginx: [error] open() "/run/nginx/nginx.pid" failed (2: No such file or directory)
/ # nginx
/ # nginx -s reload
/ # nginx -s reload
/ # 
/ # 
/ # 
/ # 
/ # nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
/ # 
/ # nginx -s reload
/ # 
/ # 
/ # 
/ # cat /run/nginx/nginx.pid 
39
/ # 

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

原创文章,作者:星辰,如若转载,请注明出处:https://www.z88j.com/336.html

(16)
打赏 微信扫一扫 微信扫一扫
上一篇 2021年6月26日 下午9:37
下一篇 2021年7月21日 下午5:06

相关推荐

发表回复

登录后才能评论

Warning: error_log(/www/wwwroot/www.z88j.com/wp-content/plugins/spider-analyser/#log/log-2601.txt): failed to open stream: No such file or directory in /www/wwwroot/www.z88j.com/wp-content/plugins/spider-analyser/spider.class.php on line 2900