Resolve Nginx: [ERROR] Open () "/usr/local/nginx/logs/nginx.pid

Source: Internet
Author: User

Restarting the server, accessing the Web service discovery is unable to browse! Go to Nginx after landing server to use./nginx-s Reload read the configuration file again and found that the report nginx: [ERROR] Open () "/usr/local/nginx/logs/ Nginx.pid "failed (2:no such file or directory) error, go to logs files found no Nginx.pid file

[Root@localhost sbin]#./nginx-s Reload

Nginx: [ERROR] Open () "/usr/local/nginx/logs/nginx.pid" failed (2:no such file or directory)

Workaround:

[Root@localhost nginx]#/usr/local/nginx/sbin/nginx-c/usr/local/nginx/conf/nginx.conf

Specify the location of the nginx.conf file using the nginx-c parameters

[Root@localhost nginx]# CD logs/

[Root@localhost logs]# LL

Total Dosage 12

-rw-r--r--1 root 1246 December 9 18:10 Access.log

-rw-r--r--1 root root 516 December 15:39 Error.log

-rw-r--r--1 root root 5 December 15:38 nginx.pid

Look at the Nginx.pid file already.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.