Monday, 11 September 2017

webserver - Can't access my locally hosted site


I have successfully hosted a WAMP Webserver site locally on the pc of IP=192.168.4.20, and given it the domain of lsadcw.net.


So whenever I write lsadcw.net in my browser URL area, the site shows up on the hosted machine. Now, the website can be accessed on my phone by writing 192.168.4.20. But, I am unable to access it using "lsadcw.net". The phone model is Sony Xperia E3 and the PC is a Windows 7 self built machine.



Answer



As @Insane said, the problem is your DNS.


The Windows machine knows its name is "lsadcw.net" because you advised it of that fact - but nothing has told your phone this.


In order to fix the problem you will need to tell your phone the IP address - and unfortunately this is not trivial. There are 2 ways to do it - by editing the phones "hosts" file - which is probably not possible unless you have jailbroken/rooted it, or by changing the DNS.


Unfortunately changing the DNS requires either that you run your own nameserver and have it configured (eg on the router and have it provide DHCP - but most off-the-shelf routers can't do this), or by registerering the domain "lsadcw.net" with a registrar like Namecheap, and setting an A record to point to 192.168.4.20 - and while this will work, its not ideal as it will only work when you are on your LAN.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...