重启nginx: /usr/local/nginx/sbin/nginx -s reload
报错代码:nginx: [error] open() “/usr/local/nginx/logs/nginx.pid” failed (2: No such file or directory) (如下图)
1. 重新运行一下/usr/local/nginx/sbin/nginx
2. 重启nginx:/usr/local/nginx/sbin/nginx -s reload
上面办法有些朋友可以解决但大多数据解决不了,于是接着google搜索
看一英文的
issued a nginx -s stop and after that I got this error when trying to reload it.
[error]: invalid PID number "" in "/var/run/nginx.pid"
That /var/run/nginx/pid file is empty atm.
What do I need to do to fix it?
nginx -s reload is only used to tell a running nginx process to reload its config. After a stop, you don't have a running nginx process to send a signal to. Just run nginx (possibly with a -c /path/to/config/file)
于是我用了这方法,也就是
nginx -c /path/to/config/file) //在我机器上是这样的/alidata/server/nginx/sbin/nginx -c /alidata/server/nginx/conf/nginx.conf
Tplink企业版路由器WiFi名称的默认设置介绍(Tplink企业版路由器WiFi名称的默认设置是什么)
Tplink路由器灯常亮无法上网的原因分析(如何解决Tplink路由器灯常亮无法上网的问题)
Tplink千兆企业级路由器自动重启的作用和优势介绍(如何设置Tplink千兆企业级路由器自动重启功能)
一根天线的tplink路由器有哪些(一根天线的Tplink路由器的特点和优势介绍)
tplink路由器外网访问不了nas(Tplink路由器外网访问NAS的原因分析)
Tplink无法搜到路由器的原因分析(如何解决Tplink无法搜到路由器的问题)