概要:
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 [email protected]
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.感謝