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

Source: Internet
Author: User

Restart the server, access the Web service found unable to browse! After landing the server into the Nginx use./nginx-s Reload re-read the configuration file, found the nginx: [ERROR] Open () "/usr/local/nginx/logs/ Nginx.pid "failed (2:no such file or directory) error, go to logs files found sure there are no nginx.pid files

[Email protected] sbin]#/nginx-s Reload

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

Workaround:

[Email protected] 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 parameter

[Email protected] nginx]# CD logs/

[email protected] logs]# LL

Total Dosage 12

-rw-r--r--1 root 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 there.

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

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.