On my mac it resolve the computer-name or localhost or ipaddress of course. But i'm trying to use my phone to access the server setup on my machine but I can only resolve it using my mac's ip address but not the mac's computer name. Any reason on why this is? Also I have modified the /etc/hosts file to map my computer's ip address to name like mypc.dev. And tried to access mypc.dev/ on my phone but it cannot resolve the dns as well. Any advice on how to proceed?
migrated from stackoverflow.com Dec 24 '12 at 12:54
Whatever you set in your
So what you have to do in order to get the name to work is use/set the actual
After you've done that, you also need to make your webserver "listen" on this hostname. By default, it only listens to IP or
Either change that to your desired name, or add an alias for
Then restart Apache and it should start listening on that name.