wampserver配置多站点
2015-05-31 20:43
218 查看
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>
完成。
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>
完成。
相关文章推荐
- 计算日期
- 念王神之出差中原
- hdu 5253
- Android文字转语音
- 案例_用户通过配置文件运行指定的类和方法
- 公交查询系统测试计划
- 习惯七:不断更新---平衡的自我更新的原则
- 内存管理
- 第十二周上机项目2 摩托车继承自行车和机动车
- 简单的实现计算机功能代码如下
- 2015年大一下第12周项目4-链表类(1)
- Hilbert 空间填充曲线的产生式规则
- SMP
- AOP之代理模式(三)
- ECharts初识与Echarts-java类库应用
- 3.srs文档
- Windows Server 2012 之文件服务器(FTP)
- SHELL脚本if语句
- 浅析_tmain()与main()的区别
- http怎么加入超时和代理