报错:
> ./nginx -s reload
nginx: [error] open() "/var/run/nginx/nginx.pid" failed (2: NO such file or directory)
> cd /var/run/nginx
-bash: cd: /var/run/nginx: 没有那个文件或目录
先创建 缺失的目录,此时若依旧不能重启
> mkdir /var/run/nginx
> ./nginx -s reload
nginx: [error] invalid PID number "" in "/var/run/nginx/nginx.pid"
重新指定一次配置文件位置 即可解决
> ./nginx -c /usr/local/nginx/conf/nginx.conf
> ./nginx -s reload