nginx: [error] open() “/usr/local/nginx/logs/nginx.pid” failed (2: No such file or directory)
This error is: the pid file is missing in the logs directory.
Solution: Re-specify the configuration file loaded at startup, and then restart. If the nginx configuration file directory is: /usr/local/nginx/conf/nginx.conf
First execute the command: /usr/local/nginx/sbin/nginx -c/usr/local/nginx/conf/nginx.conf
Then: /usr/local/nginx/sbin/nginx -s reload for smooth restart, no error will be reported
Similar Posts:
- [Solved] Nginx: [error] open() "/usr/local/Nginx/logs/Nginx.pid
- [Solved] Nginx Log Error: open() “/opt/Nginx/nginx/nginx.pid” failed (2: No such file or directory)
- Nginx Error: nginx: [error] CreateFile() “D:\nginx-1.20.1/logs/nginx.pid” failed (2: The system cannot find the file specified)
- nginx: [error] open() “/usr/local/nginx/logs/nginx.pid“ failed (2: No such file or directory)
- CentOS starts nginx and prompts nginx: [emergency] still could not bind ()
- nginx Server Start Error: nginx: [emerg] open() “/var/run/nginx/nginx.pid” failed (Linux Restart)
- [Solved] Nginx restart error: nginx: [error] open() “/run/nginx.pid” failed (2: No such file or directory)
- [Solved] Nginx Startup Error: nginx: [alert] could not open error log file: open() “/usr/local/nginx/logs/error.log“ failed
- nginx: [emerg] getpwnam(“nginx”) failed [How to Fix]
- Troubleshooting of nginx error under Windows: createfile() “XXX / logs / nginx. PID” failed