Solution for Nginx not started under CentOS Server
Question 1:
- Nginx: [emerg] hostnotfoundinupstream "11. lum" in/usr/local/nginx/conf/vhost. conf: 116
- Nginx started successfully! Nginxwasstartedsuccessfully.
The preceding error indicates that nginx is not started. The above statement is prompted when you click Start.
Similar to the error, Solution
Click website on the left (virtual host) => edit any website => Save without changing anything => edit any website after starting nginx successfully, save without changing anything => OK
Problem 2: If Nginx is enabled after the server is restarted, the following error is reported when Nginx is manually started in the background.
- Authorization: [emerg] authorization, authorization: 512orserver_names_hash_bucket_size: 128 nginx: [emerg] couldnotbuildtheserver_names_hash, authorization: 512orserver_names_hash_bucket_size: 128
- Nginx restart failed! Nginxwasrestartedfailed.
Solution: log on to ssh and change the value of this line in the/usr/local/nginx/conf/nginx. conf file.
Originally: server_names_hash_bucket_size 128; changed to: server_names_hash_bucket_size 512;
If you have manually modified the pseudo-static website, this section also checks that sometimes it may be a problem with the pseudo-static website. If you delete the pre-pseudo-static files, you can also solve the problem.