-1


Ok, I have Wamp on my laptop up and running. I also configured it to be visible on all the devices in my local network, so that I could connect to it on my Phone and other laptops.

I have created a virtual host via wamp tools (Add a Virtual Host) named myexample.etc and it works from the laptop where I am running wamp (the server, let's say). But it doesn't work from other devices connected to the same network. It only works by typing the IP, not by typing the dns created.

Is it possible to do something to access this dns (virtual host) created from other devices in the same network?

Thank you in advance!

Andrew T
  • 79
  • 1
  • 1
  • 9
  • You are adding the dns to the /etc/hosts file I assume. Check out https://unix.stackexchange.com/questions/16890/how-to-make-a-machine-accessible-from-the-lan-using-its-hostname – Example person Mar 27 '20 at 14:29
  • Thanks for the answer, but I have /etc/host file modified according to that post, and it still doesn't work from my phone, this is the content of it:`# 127.0.0.1 localhost ::1 localhost 127.0.0.1/journal journal.etc ::1 localhost/journal 127.0.0.1 journal.etc ::1 journal.etc` My dns is journal.etc and where it redirects is wamp/www/journal. – Andrew T Mar 27 '20 at 14:59
  • OK, it works if, on CLIENT pc I edit the hosts file to map the ip 192.168.100.5 to the dns journal.etc. But, on my phone I can't do this. Is there another way to map the incoming dns to the IP on my local server machine something like: I write on my **phone** browser journal.etc and it redirect to 192.168.100.5 on my server? – Andrew T Mar 27 '20 at 15:24
  • please tell me what am i doing wrong here – Andrew T Mar 27 '20 at 15:57
  • Nothing really. But just thinking wrong. Now you understand. So nothing wrong. – Example person Mar 27 '20 at 16:00
  • Sorry, I don't understand you. What do you mean? Is there a way to access the IP from the source computer on a client phone? To not entering the ip every time I want to access that server? – Andrew T Mar 27 '20 at 16:04
  • You can access the local IP address from you phone if your phone is on the same local network. – Example person Mar 27 '20 at 16:16
  • OK, I know that, I've just said that a few times, I just need to know if I could somehow access the DNS. Thank you. – Andrew T Mar 27 '20 at 16:40

1 Answers1

1

I assume you do not actually have a DNS Server running.

So when you say DNS, you mean you change the HOSTS file on the PC running WAMPServer.

This works by seeding the DNSCache on that PC at boot time, it does not and cannot have any effect on any other device in your local network. So there are basically 2 ways to access your website running on WAMPServer.

  1. You amend all the other PC's HOSTS file and add something like this, assuming the WAMPServer PC is on IP Address 192.168.1.10

    192.168.1.10 myexample.etc
    

If you cannot access the HOSTS file on all the other devices such as phones and tablets that have not been jailbroken

  1. Access the site by the IP Address of the PC running WAMPServer, I wrote up a way of doing that on another question, so here is the link
RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
  • He does not have a DNS Server installed I suppose, that way he won't be able to use the domain he configured in his local host file to access his local site from an external device in his local network. – Adrian Vignolo Aug 31 '23 at 05:33
  • @AdrianVignolo Is this a question or an attempt to tell me the answer is wrong? – RiggsFolly Aug 31 '23 at 10:04