0

I am trying to run a proxy with Nginx and I implemented the following tutorial as preparation. I did exactly as instructed here and I was served a 502 Bad Gateway result when I entered http://develop.microideation.local

https://blog.microideation.com/2020/04/19/setup-a-local-development-proxy-using-nginx-handling-cors/#:~:text=%20Setup%20a%20local%20development%20proxy%20using%20Nginx,to%20configure%20Nginx%20for%20resolving%20the...%20More%20

I am on Ubuntu 18.04 and Nginx 1.14. I checked whether my firewall was blocking Nginx but it was deactivated even. Can anyone help me troubleshoot why I would get a 502 Bad Gateway given these configurations?

The log errors when querying the domain:

2021/11/02 19:15:05 [error] 10754#10754: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: develop.microideation.local, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "develop.microideation.local"
2021/11/02 19:15:05 [error] 10754#10754: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: develop.microideation.local, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:3000/favicon.ico", host: "develop.microideation.local", referrer: "http://develop.microideation.local/"
2021/11/02 19:15:11 [error] 10754#10754: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: develop.microideation.local, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "develop.microideation.local"
2021/11/02 19:15:11 [error] 10754#10754: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: develop.microideation.local, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:3000/favicon.ico", host: "develop.microideation.local", referrer: "http://develop.microideation.local/"
2021/11/02 19:16:53 [error] 10754#10754: *7 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: develop.microideation.local, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "develop.microideation.local"
2021/11/02 19:16:53 [error] 10754#10754: *7 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: develop.microideation.local, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:3000/favicon.ico", host: "develop.microideation.local", referrer: "http://develop.microideation.local/"

Results when querying via curl:

user@workspace:/etc/nginx/conf.d$ curl http://develop.microideation.local
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.14.0 (Ubuntu)</center>
</body>
</html>
Mnemosyne
  • 127
  • 5

0 Answers0