使用/usr/local/nginx/sbin/nginx -s reload 重新读取配置文件出错

[root@localhost nginx]/usr/local/nginx/sbin/nginx -s reload
提示 nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"

[root@localhost nginx]# cd logs
[root@localhost logs]# ls
access.log error.log nginx-access.log nginx_error.log
果然没有/usr/local/nginx/logs/nginx.pid 文件

解决方法:用指定文件加载nginx配置文件
[root@localhost nginx]/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

相关文章:

  • 2021-07-29
  • 2021-05-30
  • 2021-12-24
  • 2021-07-29
猜你喜欢
  • 2021-08-29
  • 2022-12-23
  • 2022-01-03
相关资源
相似解决方案