- First start Wamp, after success, click the icon, find the Apache server under Httpd.conf, directly open
- Press the CTRL+F key to search for Virtual hosts in the search box and search for results such as;
3. Then open the Wamp installed file location, my path is D:\wamp this personal situation as a flexible response;
4. Enter Wamp under bin\apache\apache2.2.21 (here is the Apache version number, depending on personal circumstances, may be different) \conf\extra directory, open httpd-vhosts.conf, pull directly to the end of the file, as follows:
5. This shows that I have configured two virtual hosts, below the virtual host inside the five parameters to do a brief description:
A.serveradmin This is the admin mailbox
B.documentroot This is the root directory of the domain entry
C.servername This is the domain name of the virtual host (name whatever)
D.errorlog This is the error log, followed by the storage address of the log
E.customlog This is a log of virtual host access.
6. Enter C:\WINDOWS\SYSTEM32\DRIVERS\ETC, open the following host file, and pull directly to the last, as shown below
IP address unification is 127.0.0.1, the following name is consistent with the domain name of the virtual host
Configuring multiple virtual hosts in the WAMP environment