Question

Go docker giving 502 Bad Gateway

Hi!

I followed the tutorial here: https://www.digitalocean.com/community/tutorials/how-to-deploy-a-go-web-application-with-docker-and-nginx-on-ubuntu-18-04

I am getting 502 Bad Gateway for https and (lately) 301 Moved Permanently for http.

The container runs fine locally. I tested my domain by starting a simple nginx server, connects perfectly. I disabled the firewall to make sure that was not blocking anything.

Any ideas where to look next? I did follow the tutorial to the T and even started a new instance and did it again.

Thanks for any help!

Subscribe
Share

Edit: It runs on http following the docs here: https://github.com/nginx-proxy/docker-letsencrypt-nginx-proxy-companion#lets-encrypt

I did add the EMAIL variable to nginx-proxy-compose.yaml in the tutorial, but it’s still not working. It looks like everything else is the same as in the nginx-proxy docs, but I cannot get it to run with the yaml.

So issue solved partially, since I get it to run now, but I am getting a certificate error on the https. Looking into solving that now.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there @pantero,

I’ve just tested the tutorial and it seems to be working well with HTTPS as well, however, note that in the case you receive an error about invalid TLS certificates, wait a few minutes for the Let’s Encrypt add-on to provision the certificates.

If you are still getting errors, can you share your go-app-compose.yaml file here?

Regards, Bobby