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 阅读(151) 评论(0) 编辑 收藏 举报
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步