wampserver2.5版本自定义网站根目录and多站点配置
来源:互联网 发布:哈尔滨公交车查询软件 编辑:程序博客网 时间:2024/06/12 18:53
自定义网站根目录
wampserver 默认是 c:/wamp/www 我们该成自定义的比如 c:/WampProject
需要修改的三个文件
apache下的httpd.conf
Wampserver的 配置文件wampmanager.ini和wampmanager.tpl(坐下角的www 目录是由wampserver配置文件得到,跟apache修改的保持一致,当然了这个可以不用修改)
步骤1:httpd.conf documentroot 以及 directory路径 改成 c:/WampProject,最后保存
步骤2:wampmanager.ini和wampmanager.tpl,分别搜索mean.left 修改caption FileName,注意tpl文件里面的$符号要删掉,最后修改的模样是"WampProject 目录"和"c:/WampProject" ,最后保存
步骤3:重启所有服务
测试 在c:/WampProject下建立test.php,在浏览器运行http://localhost/test.php,出现输出语句则自定义网站根目录正确,并查看左下角图标根目录是否与修改匹配
参考http://jingyan.baidu.com/article/22fe7ced1ca16b3003617f7c.html
多站点配置
步骤1:修改apache扩展的httpd-vhosts.conf文件,添加站点,
<VirtualHost *:80>
DocumentRoot "c:/WampProject"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/WampProject/Test01"
ServerName test01.com
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/WampProject/Test02"
ServerName test02.com
</VirtualHost>
DocumentRoot "c:/WampProject"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/WampProject/Test01"
ServerName test01.com
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/WampProject/Test02"
ServerName test02.com
</VirtualHost>
apache默认不加载这个扩展
步骤2:扩展包含到apache里面,修改httpd.conf,搜索httpd-vhosts.conf,去掉#
步骤3:修改httpd.conf,两个directory标签里面,
<Directory />
AllowOverride none
Allow from all,
#Require all denied
</Directory>
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
<Directory "c:/WampProject/">
#
# 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
Allow from all
#Require local
</Directory>
AllowOverride none
Allow from all,
#Require all denied
</Directory>
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
<Directory "c:/WampProject/">
#
# 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
Allow from all
#Require local
</Directory>
步骤4:修改本机的host文件 添加127.0.0.1 test01.com 127.0.0.1 test02.com
步骤5:重启所有服务,浏览器运行test01.com test02.com
0 0
- wampserver2.5版本自定义网站根目录and多站点配置
- WAMPServer3.0.6 64bit自定义网站根目录与多站点配置(是否适用于其他版本尚未测试过,其他版本需谨慎)
- WAMPServer3.0.6 64bit自定义网站根目录与多站点配置(是否适用于其他版本尚未测试过,其他版本需谨慎)
- wampserver2.4.9多站点配置笔记
- wampserver集成环境安装,自定义根目录以及多站点配置
- PHP_WAMPServer安装+配置(自定义根目录、多站点、端口)
- Wampserver2.5配置虚拟主机
- windows7配置wampserver2.5
- Xampp配置多站点及根目录
- wamp改网站默认根目录,使用域名重定向,多站点配置
- wamp改网站默认根目录,使用域名重定向,多站点配置
- tomcat配置站点根目录
- 设置网站站点的根目录
- 自定义网站根目录
- wamp自定义网站根目录
- wampserver自定义网站根目录
- WAMP自定义网站根目录
- WAMPServer自定义网站根目录
- 自定义 既可输入文字又可选择的 控件ComBox—2
- [模板]后缀数组
- java中io流操作
- java垃圾回收机制---面试的问题
- iOS;ipa文件反编译
- wampserver2.5版本自定义网站根目录and多站点配置
- Wdatepicker日期控件的使用指南
- 融云聊天和IQKeyboardManager键盘上面的Toolbar冲突
- PHP底层探索(四):SAPI的生命周期
- 计算机专业学生必读
- Android 图像变换Matrix的原理应用
- linux下怎么通过.sh文件启动java程序
- BZOJ2400 Spoj 839 Optimal Marks
- 解决Visual Studio 调试时候不够直接访问Json文件的问题