An error was reported when starting nginx: nginx: [error] open() “/ usr/local/nginx/logs/ nginx.pid ”Failed (2: no such file or directory)
solutions
are different every time I encounter them. I have encountered two solutions here, and I’d like to share them here
Situation 1: nginx.conf Of nginx.pid Annotated
Enter nginx.conf Catalog editor
sudo vi /usr/local/nginx/conf/nginx.conf
Just cancel the comments and restart nginx
sudo nginx -s reload
Case 2: no configuration directory is specified
Enter to use the specified nginx.conf Restart nginx in the form of file (first, make sure that the PID in the first case is not commented, otherwise it may be opened for the first two times, but an error will still be reported later)
sudo /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
Read More:
- nginx: [error] open() “/usr/local/var/run/nginx.pid” failed (2: No such file or directory)
- Nginx startup error: nginx: [error] open() “/ var / run / nginx/ nginx.pid The solution of “failed (2: no such file or directory)”
- nginx: [error] open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory)
- nginx: [error] open() “/run/nginx.pid” failed (2: No such file or directory)
- nginx: open() “/var/run/nginx.pid“ failed (2: No such file or directory)
- /var/run/nginx/nginx.pid” failed (2: No such file or directory)
- nginx: [error] invalid PID number ““ in “/data/nginx/logs/nginx.pid“
- Nginx error: nginx: [error] invalid PID number “” in “/run/nginx.pid”
- CentOS7 nginx Failed to read PID from file /run/nginx.pid: Invalid argument?
- nginx: [error] invalid PID number in /var/run/nginx.pid
- Solve the problem of starting nginx nginx.pid error
- Nginx start error: job for nginx.service failed because the control process exited with error code
- Error: enoent: no such file or directory, stat ‘/ usr / local / var / www / /_ book/gitbook/git
- Error: enoent: no such file or directory, stat ‘/ usr / local / var / www / / book/gitbook/git
- Error! Failed to start nginx
- Ubuntu 20.04 builds nginx 1.18.0 and MAC file transfer / download to server
- nginx: error while loading shared libraries: libluajit-5.1.so.2: cannot open
- nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
- Implementation of HTTPS file server based on nginx in win2012
- Nginx installation in MAC