In our local network we have an Ubuntu Server 20.4
, where it hosts a web application. I configured my router and the DNS of the domain, I installed Lets'Encrypt
certificate and I have succeed that https://mydomain.com
to show my web application.
My issue is that when I try to see the domain https://mydomain.com
from inside the local network, the browser responds that `This site can’t be reached, but when I am connected outside the site is visible.
I have to apply a new setting in the Ubuntu Server or this is a router's configuration matter?
One solution...
I edited hosts
file in my pc (C:\Windows\System32\Drivers\etc\hosts) adding a record
192.168.0.100 mydomain.com
and the site is visible now, but I would like to know how can I apply a setting to Ubuntu server.
Edit 1
If I run nslookup mydomain.com
from the command line of Windows I get:
Server: one.one.one.one
Address: 1.1.1.1
Non-authoritative answer:
Name: mydomain.con
Address: My_External_IP
Both Ubuntu Server
and my PC are on the same subnet. I have added some port forwards (80, 443) to the router, in order to make public the server.
hosts
file of each potential client (as you already did).mydomain.com your_external_ip
as already done. Add a record like thislocal.mydomain.com 192.168.0.100
and access your web server internally using the name local.mydomain.com