wampserver配置多站點

1.打開C:\wamp\bin\apache\apache2.2.22\conf\httpd.conf(因安裝的路徑而異),查找listen 80 下面加上listen 8080html

2.而後加上apache

<Directory "e:/www/">
#
# 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.2/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:
# Options FileInfo AuthConfig Limit
#
AllowOverride allide

#
# Controls who can get stuff from this server.
#this

# onlineoffline tag - don't remove
Order Allow,Deny
Allow from allorm

</Directory>server

這是讓服務器能夠訪問e:/www/這個文件夾htm

3.搜索Include conf/extra/httpd-vhosts.conf,把以前的#去掉ci

4.打開 conf/extra/httpd-vhosts.conf文件,而後加上(注意,要將默認80端口的也加上,不然你將用不了80端口了)rem

<Virtualhost *:80>

ServerName localhost

DocumentRoot "c:\wamp\www"

</Virtualhost>
<Virtualhost *:8080>

ServerName localhost

DocumentRoot "E:\www"

</Virtualhost>

完成。

相關文章
相關標籤/搜索