Go docker giving 502 Bad Gateway


I followed the tutorial here:

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!

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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