Question

Can't get my landing page for nginx docker container.

I already set-up nginx docker container to my Ubuntu 20.04 VM, but when I type the ip address of my VM in my system’s browser plus port 8080 something like 192.168.0.51:8080. It doesn’t work. It should take me to the nginx landing page, and I believe I followed the steps in the guide.


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.

KFSys
Site Moderator
Site Moderator badge
February 12, 2023

Hey @juancarlosfloreshernandez,

Can you share the article you followed? Additionally, what happens when you run docker run on your Droplet’s shell.

Additionally to check if your container is running you can do docker ps . Additionally here is a cheat sheet here - https://www.digitalocean.com/community/tutorial_collections/how-to-install-and-use-docker

Let me know how it goes.

Bobby Iliev
Site Moderator
Site Moderator badge
February 10, 2023

Hi there,

Can you share the docker run command that you’ve used here? And also what is the exact error that you get when you try to visit the page?

A few things that you could check are:

  • Make sure that your container is actually still running using the docker ps command and if it is not running check the logs with docker logs CONTAINER_ID
  • If you have a firewall, make sure that port 8080 is open for incoming connections
  • Check your Nginx configuration file and make sure that you’ve set it up to run on the specified port

Best,

Bobby

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.