Question:
After Linux restarts, an error is reported when starting the nginx server
Solution:
1. Use the command CD/usr/local/nginx/conf to enter the specified directory
2. Use the command VI nginx Conf modify the configuration file # and remove the # number in the figure
3. Change to PID/usr/local/nginx/logs/nginx.pid;
4. Use the command MKDIR/usr/local/nginx/logs to create a directory
5. Start nginx service
Similar Posts:
- [Solved] Nginx Log Error: open() “/opt/Nginx/nginx/nginx.pid” failed (2: No such file or directory)
- [Solved] Nginx Restart Error: nginx: [error] open() “/usr/local/nginx/logs/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)
- [Solved] Nginx: [error] open() "/usr/local/Nginx/logs/Nginx.pid
- Nginx Failed to Starup Error: [emerg] mkdir() “/var/tmp/nginx/client” failed (2: No such file or directory)
- nginx: [error] open() “/usr/local/nginx/logs/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 Error: nginx: [emerg] “server” directive is not allowed here in
- Troubleshooting of nginx error under Windows: createfile() “XXX / logs / nginx. PID” failed
- [Solved] Nginx restart error: nginx: [error] open() “/run/nginx.pid” failed (2: No such file or directory)