Look in the "httpd.conf" file: Include conf/extra/httpd-vhosts.conf, remove the previous comment #.
Open a. extra/httpd-vhosts.conf file; Add similar content to the last: (file path is the path of your own installer)
<virtualhost *:80>
DocumentRoot "D:/wamp/www/aaa" (this is the file path where you put the program)
ServerName www.aaa.com (This is your own definition of the domain name)
</VirtualHost>
Find this file last added:
127.0.0.1 www.aaa.com (This is your own definition of the domain name)
- 3
Save and restart the service. In Browser input: www.aaa.com view effects.
Precautions
The default root directory is also added to httpd-vhosts.conf or the default path is not available.
Final Result:
Each time you add a new site, the following adds one:
<virtualhost *:80>
DocumentRoot "D:/wamp/www/xxx" (this is the file path where you put the program)
ServerName www.xxx.com (This is your own definition of the domain name)
</VirtualHost>
Wampserver Configuring multiple Sites