0

This is in reference to the question posted here: Access virtual host from another machine over LAN

The solutions in that link are to access virtual address through main server's IP address. However is it possible to access just through the virtual domain address? For example : www.project2.com Instead of using server's IP address : xxx.xxx.xxx.xxx

  • What do you mean "www.project2.com _instead of_ using the server's IP address"? – ProgrammingLlama Jun 03 '19 at 08:05
  • Well, what I mean we create a virtual domain address like "www.project2.com". Now to access this from another computer gets difficult because it will try to check from the DNS server list but not from virtual. It is more like to create a static IP address by creating static virtual host address. –  Jun 03 '19 at 08:08
  • What do you mean "but not from virtual"? I don't entirely follow. – ProgrammingLlama Jun 03 '19 at 08:09
  • Look: You either need the DNS server that the other computer uses to know about the domain and its host IP, or you need this workaround. Maybe if you're on an Active Directory domain you can do something more, I'm not sure, but the second computer needs some way of discovering the IP address. – ProgrammingLlama Jun 03 '19 at 08:15
  • So lets assume you have a wamp server, now you create a virtual server address instead of using "localhost". lets name that server address as "www.pro.com". Now since a WAMP server is running in the background, only your computer can access this website. But when you try to access this website from another computer connected to the same network, that system will not be able to access it. –  Jun 03 '19 at 08:16
  • But a "virtual server" is only a virtual server in the respect that your Apache server will look at the `Host` header when it receives a connection, and then handle it according to the rules defined for that host. It's not like you have an extra virtual machine on your network or anything. You could set up a local DNS server. – ProgrammingLlama Jun 03 '19 at 08:17
  • 1
    Also, names are _not_ addresses. IP only uses addresses. Names get translated to addresses by an application using DNS, but IP itself knows nothing about names. – Ron Maupin Jun 03 '19 at 12:41

0 Answers0