Nginx start to solve the error nginx: [emerg] host not found in upstream

Solution from: https://blog.csdn.net/Hreticent/article/details/86074502

Thanks to this friend simple and clear solutions.

 

When configuring nginx supports PHP, because there are sites before, configure more chaos. Particularly in support of JSP

When the cause restart nginx, has been given nginx: [emerg] host not found in upstream like this error.

Do not understand why such a variety, a solution had to search everywhere, really a lot of ways, that is, not many can understand, do not know what to say.

There are a lot of reference do not achieve.

Then finally we see a simple solution.

Because the current system can not resolve the domain name back along the upstream. Cause not restart.

The solution is very simple, is to modify the hosts file, the same as the WIN system.

vi /etc/hosts

127.0.0.1 www.xxx.com

Add information on top of a similar increase that domain name back in the upsteam IP behind.

This problem is solved.

Guess you like

Origin www.cnblogs.com/leafinwind/p/11301790.html