Can't access my locally hosted site

-1

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.

DarkNet99

Posted 2015-09-27T13:54:23.437

Reputation: 13

is your phone configured to use a DNS server on your LAN, or is it using an ISP or Carrier DNS server? It probably depends on your DHCP server settings for your LAN. – Frank Thomas – 2015-09-27T17:23:03.957

1Have you configured your domain's DNS settings to point to your public IP? Unless I'm reading wrong, that seems to be the issue. The reason it works locally is because you're forcing it to. – Insane – 2015-09-27T19:31:24.013

So how do you have lsadcw.net set? Is this in the hosts file on the Windows PC or something else? I believe that all you have setup right now is a local development copy you want to access on the Sony Xperia E3, correct? Well a locally set hostname on the PC only affects that PC and is not a DNS setting for your whole network. – JakeGould – 2015-09-27T23:55:54.243

Answers

3

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.

davidgo

Posted 2015-09-27T13:54:23.437

Reputation: 49 152

OH. I assumed he already registered the domain! Yes, OP, you must buy a domain in order to use it on the public internet :P – Insane – 2015-09-27T23:36:33.970

it is a local site, and want to access it locally using the lsadcw.net – DarkNet99 – 2015-09-28T15:43:19.253