Question

nginx default page is not shown via IP address

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

I set up server and found my IP address. However, I can’t open nginx default server via my IP. It works only if I type localhost in browser. I get the error: The connection has timed out Why is it so?


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.

Hello,

I wanted to give a more updated answer on the topic. You’ve installed Ubuntu on your laptop thus you access it only via localhost. If you want to access it via your IP address, you need to open your port 80 and configure your router to accept traffic from outside sources and display your website.

Having said the above, this is not a recommended practice. If you want to test your configuration locally, it’s fine to just use localhost, there is no need to access your IP address. If you want to host a real application, one that needs to be accessed by a lot of users, then I’ll recommend you to get a Droplet and use that one.

Hi @ilyagvv,

Where are you configuring this, is it on your local machine or on a Droplet?

If it’s on your local machine this might be the reason. Can you confirm your what your Nginx configuration is to see if there are any issues with it?