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


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

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel