Solution for Nginx not started under CentOS Server

Source: Internet
Author: User
Tags centos server

Solution for Nginx not started under CentOS Server
Question 1:

  1. Nginx: [emerg] hostnotfoundinupstream "11. lum" in/usr/local/nginx/conf/vhost. conf: 116
  2. 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.

  1. Authorization: [emerg] authorization, authorization: 512orserver_names_hash_bucket_size: 128 nginx: [emerg] couldnotbuildtheserver_names_hash, authorization: 512orserver_names_hash_bucket_size: 128
  2. 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.


Related Article

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.