[root@localhost sbin]# ./nginx -s reload
nginx: [error] invalid PID number "" in "/var/run/nginx/nginx.pid"
或者我们重新修改了nginx.conf配置文件,然后重新启动./nginx -s reload 有可能报
nginx: [error] open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory)
解决方法:
重新加载的时候,不要单纯的写./nginx -s reload了,我们需指定我们的配置文件,然后启动就行了!
./nginx -c /usr/local/nginx/conf/nginx.conf
./nginx -s reload