Report this

What is the reason for this report?

Can't Access Local Site pages from Local Network

Posted on January 11, 2020

I have a website using Nginx server located on Ubuntu i need to access this website from the other network machines, i configured the hosts file well, the Nginx server working well, the postgres sql working well, the firewall is disabled, and it works well on the local machine and site is fine with the local host, but the problem is when i’m trying to open the site on another local network machine using the hosted machine IP it just resolve the machine IP with the site name as it written on the hosts file but it doesn’t bring any of the site pages and give an error that (example.com’s server IP address could not be found.) Please help to to solve this issue. Thanks…



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.

Hello,

I would recommend creating Nginx server blocks for each individual site and in each server, block make sure to define your domain names as the server_name.

You can follow the steps here on how to set up Nginx server blocks:

https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04

Hope that this helps! Regards, Bobby

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.