Virtual Host EN
From UwAmp Wiki
Contents |
Introduction
Virtual hosts allow you to have more website on the same server without using alias or sub directory in the URL
The server look the used DNS and search the associed virtual host
Configuration
To create a virtual host in UwAmp just clic on the button "Apache Config" in the main window
Parameter list
Host IP : Define IP and port listening. The IP and port is separed with char ":".
You can enter * if you want listen all IP interface and all port.
The recommended setting is *:80
Server Name : DNS name associated with the virtual host.
If the field is empty your virtual host will be considered has the default configuration. In this case UwAmp call this virtual host "Apache Main" in the list of virtual hosts.
Server Alias : Other DNS name associated with the virtual host.
If you want associate the virtual host to multiple DNS enter DNS separated by a space.
Document Root : Your folder containing the website.
Exemple : C:\mywebsite\
It's recommended to use a folder with macros
Exemple : {DOCUMENTPATH}/mywebsite
{DOCUMENTPATH} is the www in UwAmp.
Test your virtual host without DNS
If you want test your virtual host on your computer without DNS Si vous souhaitez tester un virtual host en local et que vous n'avez pas de serveur DNS.
Open the file "hosts" in the folder "C:\WINDOWS\system32\drivers\etc\"
Add this at the end of file :
127.0.0.1 YOUR_DNS_NAME
Exemple if your Virtual host name is www.exemple.com:
127.0.0.1 www.exemple.com
