内容目录
问题
nginx已经安装且正常运行,新增conf文件后,使用命令检查无问题,但是执行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
nginx: [error] invalid PID number "" in "/run/nginx.pid"
解决方案
# 注意:/etc/nginx/nginx.conf是你实际的配置文件全路径
nginx -c /etc/nginx/nginx.conf
# 然后执行nginx -s reload
nginx -s reload