Francis Daly
November 17, 2019 07:16AM
On Sun, Nov 17, 2019 at 06:40:36AM -0500, naupe wrote:

Hi there,

> > root@ngx:/etc/nginx/sites-available# less /var/log/nginx/error.log
> > 2019/11/17 06:01:24 [error] 23646#23646: *37 connect() failed (111:
> Connection refused) while connecting to upstream, client:, server:
>, request: "GET / HTTP/2.0", upstream:
> "", host: ""
> * = My Old Public IP Address
> * = My New Public IP Address

nginx is trying, and failing, to connect to

Should nginx be trying to connect to If so, fix the network so
that it is able to connect there. If not, fix the nginx config so that
it tries to connect to the place that you want.

> My /etc/nginx/sites-available CONF file for the Discourse Site can be found
> in THIS link:

The relevant bit there seems to be

location / {

> * = Nginx VM
> * = Discourse VM

When nginx starts, it will ask the system to resolve the name, and it (presumably) is told

It looks to me like you want that to be instead.

In that case - either change the system resolver; or just change the
proxy_pass line to use the IP address instead of the

(Other options exist too; these are probably the ones with fewest

Good luck with it,

Francis Daly
nginx mailing list
Subject Author Posted

502 Bad Gateway - nginx/1.14.0 (Ubuntu)

naupe November 17, 2019 01:59AM

Re: 502 Bad Gateway - nginx/1.14.0 (Ubuntu)

Francis Daly November 17, 2019 07:16AM

Re: 502 Bad Gateway - nginx/1.14.0 (Ubuntu)

naupe November 17, 2019 09:37PM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 56
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