Page 1 of 1

Website - Local issues with FQDN

Posted: 2019/12/02 00:47:53
by nthomthom
Hello,

I would like to be able to access the website I have on centos 8 / apache from the same network that the actual server is hosted. Howrver, my website through my FQDN is only accessible outside the local network. when i enter my FQDN into a web browser locally it goes to my routers home page instead of the index page i have setup. In order to visit my websites home page i would have to point it to the ip address of the server.

Re: Website - Local issues with FQDN

Posted: 2019/12/04 11:44:14
by lightman47
,,, or the machine's name if you have DNS setup.

Re: Website - Local issues with FQDN

Posted: 2019/12/05 23:43:43
by nthomthom
I get a connection refused when I'm on the same network that the server is on. If I'm on another network it connects just fine. I cannot access the website index.html page using htttp://localhost or 127.0.0.1 either. I can access it using my web servers IP of 10.0.1.XXX. Any ideas why I cant go to my own domain name?

Re: Website - Local issues with FQDN

Posted: 2019/12/06 00:35:48
by TrevorH
This sounds like a general problem with domestic routers, they often cannot loop back into themselves from inside. Try adding your LAN ip address into /etc/hosts and name it there.

Re: Website - Local issues with FQDN

Posted: 2019/12/06 01:59:41
by nthomthom
I think you are right. I’ve added:

10.0.1.110 domain.com www.domain.com

but no luck.

Re: Website - Local issues with FQDN

Posted: 2019/12/06 02:48:35
by nthomthom
It’s i've open enable WAN management and now i get the router login page again, I suspect the “connection refused” was due to the router refusing connection to management page, not the server refusing connection.

Re: Website - Local issues with FQDN

Posted: 2019/12/17 21:25:06
by KernelOops
Unfortunately, home modem/routers are no very good with DNS resolution. There are some exceptions that allow you to override DNS entries, but not a lot. I've seen some ZTE modem/routers that have this ability.

Alternatively, a proper DNS resolver (unbound) running on a system like pfSense has the ability to override whole domains, subdomains and anything else you like.

As an example, I've setup a real domain as git.example.tld which resolves to a real static IP from the internet side, but resolves to 192.168.10.10 from within the same LAN. This makes it quite useful to use git from the same laptop within the LAN or from outside, by using the same git.example.tld address.