Question

How To Install Nginx on Ubuntu 20.04 running Docker

I was following this tutorial on how to install Nginx https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-20-04

I could not get Nginx to start as Docker is already using port 80. Should I be using a different method to add an ssl certificate if using Docker?


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 @lukewaldron87,

So, port 80 is what your Browser uses when you load a website using HTTP. If you use HTTPS to open a website, it uses port 443. I’m not sure what you are using Docker for but usually, I would recommend using Nginx on that port.

Once you have that, you should be able to set a reverse proxy to your Docker instance with Nginx so that you would be able to use both. I’ve found a DigitalOcean tutorial which I think can help you out in your case, please check it out:

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

Regards, KFSys