Report this

What is the reason for this report?

How To Install Nginx on Ubuntu 20.04 running Docker

Posted on May 29, 2021

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?



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!

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.