Welcome! Log In Create A New Profile

Advanced

Re: Nginx domain resolution 502 gateway

Francis Daly
September 29, 2019 04:42AM
On Wed, Sep 25, 2019 at 06:06:16AM -0400, medievil19 wrote:

Hi there,

> At the moment, even though the host file is changed and a local cmd ping
> brings up our server, i get a 502 gateway error nginx in the browser,
> checking nginx error logs i believe it's because nginx server is trying to
> resolve the 3rd party real host IP address but my machine is set to resolve
> the server ip version.

If your nginx config file uses hostnames in the form

proxy_pass http://$variable;

then nginx needs to use a run-time resolver to find the IP address. That
will probably not use the local hosts file, even indirectly.

If your nginx config uses hostnames in the form

proxy_pass http://www.example.com;

then nginx will use the system resolver at startup to find the IP address.
That will probably use the local hosts file.

I confess that from your mail, I am not sure what machines are involved
in your system, and how you want them to interact. So I can't say exactly
what should be changed, where.

But hopefully the above will help you work out what needs doing.

Good luck with it,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx domain resolution 502 gateway

medievil19 September 25, 2019 06:06AM

Re: Nginx domain resolution 502 gateway

Francis Daly September 29, 2019 04:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 119
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready