Forum Moderators: phranque
I have just set up an Apache server on my local network, and require it to be accessed from different URIs, such as live.network.local, or *.network.local, with the websites document root being set to F:/live or F:/* respectively.
The server also has two network interfaces, 192.168.0.2 and 192.168.1.1, as well as a hostname, svr1. When any of these are accessed, I want it to point to the live version of the site, or F:/live.
I have tried using VirtualHost containers, and also the VirtualDocumentRoot directive, but with no success.
Is there anything specific that I am missing or not doing correctly?
Any help would be greatly appreciated. If you need any more information, ask and I shall post it.
Cheers,
Jay
Then add definitions to your operating system's "hosts" file to point the hostnames to one of the two IP addresses.
I believe you'll have to define the name-based server first, otherwise the name-based vHost container will never be used, because the IP address will aready have been looked up in your hosts file.
The hosts file is present in all operating systems, but its location varies. The name of the file is always just "hosts" -- no file extension. It is a plain-text file (ASCII) and should be edited using a plain-text editor such as NotePad on Windows or vi on *nix.
Jim