wampserver配置多站点
1.打开C:\wamp\bin\apache\apache2.2.22\conf\httpd.conf(因安装的路径而异),查找listen 80 下面加上listen 8080
2.然后加上
<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 all
#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
Order Allow,Deny
Allow from all
</Directory>
这是让服务器可以访问e:/www/这个文件夹
3.搜索Include conf/extra/httpd-vhosts.conf,把之前的#去掉
4.打开 conf/extra/httpd-vhosts.conf文件,然后加上(注意,要将默认80端口的也加上,否则你将用不了80端口了)
<Virtualhost *:80>
ServerName localhost
DocumentRoot "c:\wamp\www"
</Virtualhost>
<Virtualhost *:8080>
ServerName localhost
DocumentRoot "E:\www"
</Virtualhost>
完成。
posted on 2015-05-31 20:43 liuwenbohhh 阅读(156) 评论(0) 收藏 举报
【推荐】100%开源!大型工业跨平台软件C++源码提供,建模,组态!
【推荐】AI 的力量,开发者的翅膀:欢迎使用 AI 原生开发工具 TRAE
【推荐】2025 HarmonyOS 鸿蒙创新赛正式启动,百万大奖等你挑战