概要:
1.修改系统的域名解析文件C:\Windows\System32\drivers\etc\hosts(加你的域名,比如4个域名就要加4条)
2.修改D:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf(加你的域名接受,比如4个域名就加4个)
3.修改D:\wamp\bin\apache\apache2.4.9\conf\httpd.conf(改【2+域名数量】条,比如4个域名那就是6条)
详细描述:
1.修改系统的域名解析文件C:\Windows\System32\drivers\etc\hosts(加你的域名,比如4个域名就要加4条)
2.修改D:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf(加你的域名接受,比如4个域名就加4个)
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.localhost
DocumentRoot "d:/wamp/www/dede"
ServerName www.tdede.com
ErrorLog "dede-error.log"
CustomLog "dede.log" common
</VirtualHost>
给懒人准备的文本
3.修改D:\wamp\bin\apache\apache2.4.9\conf\httpd.conf(改【2+域名数量】条,比如4个域名那就是6条)
查找这个Include conf/extra/httpd-vhosts.conf。去掉#号,图片中的我已经去除了。
注意那里写自己的文件目录。
<Directory "d:/wamp/www/crm">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride all
#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
Require local
</Directory>
给懒人准备的文本
最后参考文献:
1.深坑,不要参考(少一步)----》 “wamp集成环境开启虚拟主机多站点功能” (百度经验)我先看的这个因为先入为主反复搞了几个小时,没有第三步的后面那步,坑死我了。
2.感谢
《wampserver 配置 vhost》