: This article describes how to configure domain names on wamp. For more information about PHP tutorials, see. You can also configure multiple domain names and directories. Shield website ads ~~
1. findApacheFind the httpd. conf file in the installation directory. for example, the directory I installed is C: \ wamp \ bin \Apache\Apache2.2.21 \ conf \ httpd. conf
You can also open it through the wamp icon. Find the Virtual hosts and remove the following line before the include #
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
2. C: \ wamp \ bin \Apache\Apache2.2.21 \ conf \ extra \ httpd-vhosts.conf file
Add
#15:02:55 test multiple domain names
ServerAdmin 1439120442@qq.com
DocumentRoot "D:/www/thinkphpTest"
ServerName www.jiayou.com
ServerAlias www.jiayou.com
ErrorLog "logs/www.jiayou.com-errlo. log"
CustomLog "logs/www.jiayou.com-access. log" common
Options FollowSymLinks
AllowOverride all
Order Deny, Allow
Deny from all
Allow from all
Specifically, ServerAdmin, ErrorLog, and CustomLog are optional or you may not configure them.
3. add the following content in C: \ Windows \ System32 \ drivers \ etc \ hosts
#15:06:52 test multiple domain names
127.0.0.1 www.jiayou.com
Various websites can be blocked here.
4. restartApacheService. OK.
The above introduces the configuration domain name on the wamp, including the Apache content, hope to be helpful to friends who are interested in the PHP Tutorial.