Question

Docker Droplet with nginx but no website

I created a Docker Droplet and installed Nginx into it. Systemctl says that Nginx is running. When I browse to the IP address the browser cannot connect. I have installed .Net and SQL Server into the Droplet but nothing else.

The IP address is the same as what I use to SSH to the machine.

I created a fresh Droplet without Docker and installed Nginx into it. I see the default Nginx page that way. So perhaps it is Docker; I am not sure I need Docker.


Submit an answer
Answer a question...

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.

Hi there,

In case that you don’t need Docker, as you mentioned in your comment, you can just create an Ubuntu Droplet and install Nginx as described here:

https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-20-04

Do you have your .Net project already or are you planning to build a new project?

Best,

Bobby

I found How to Deploy an NGINX Image with Docker | NGINX and used:

docker run --name mynginx1 -p 80:80 -d nginx

And now I get the default web page.

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.