zoukankan      html  css  js  c++  java
  • 解决nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed错误

    登陆服务器之后进到nginx使用./nginx -s reload重新读取配置文件,发现报nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)错误,进到logs文件发现的确没有nginx.pid文件

     
    [root@localhost sbin]# ./nginx -s reload
    nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)
     
    解决方法:
    [root@localhost nginx]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
     
    使用nginx -c的参数指定nginx.conf文件的位置
     
    [root@localhost nginx]# cd logs/
    [root@localhost logs]# ll
    总用量 12
    -rw-r--r-- 1 root root 1246 12月  9 18:10 access.log
    -rw-r--r-- 1 root root  516 12月 10 15:39 error.log
    -rw-r--r-- 1 root root    5 12月 10 15:38 nginx.pid
     
    看nginx.pid文件已经有了。
  • 相关阅读:
    HDU 1060 Leftmost Digit
    HDU 1008 Elevator
    HDU 1042 N!
    HDU 1040 As Easy As A+B
    HDU 1007 Quoit Design
    欧拉函数
    HDU 4983 Goffi and GCD
    HDU 2588 GCD
    HDU 3501 Calculation 2
    HDU 4981 Goffi and Median
  • 原文地址:https://www.cnblogs.com/Mr-wx/p/8874659.html
Copyright © 2011-2022 走看看