wampServer多站点配置
来源:互联网 发布:君自故乡来 应知故乡事 编辑:程序博客网 时间:2024/06/05 11:05
1.配置wamp网站地址:
找到wamp的安装目录,如~\wamp\bin\apache\Apache2.4.4\conf\extra\httpd-vhosts.conf
打开httpd-vhosts.conf文件
其中有默认的样例:
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "c:/Apache24/docs/dummy-host2.example.com"
ServerName dummy-host2.example.com
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
我们配置自己的网站时,可以简单点:
<VirtualHost *:80>
DocumentRoot "e:demo/test01" (这里是要设置站点的路径)
ServerName test01.com (这里是要设置站点的域名)
</VirtualHost>
设置好后保存,有任何改动了配置的操作都要重新启动wamp。
2.配置Apache:
打开httpd.conf文件,可参考:http://www.cnblogs.com/junglexj/p/6016755.html
将其中
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf
第二行“#”去掉,表示允许;
再找到之前<Directory />里,设置成如下格式(中间两行注释掉)
<Directory />
# AllowOverride none
# Require all denied
</Directory>
3.配置hosts文件
目录:C:\Windows\System32\drivers\etc\hosts
在最下面添加一行
127.0.0.1 test01.com
保存退出,若无法保存请copy一份hosts文件到桌面编辑,再替换到C:\Windows\System32\drivers\etc目录下即可。
可以在新建一个php文件测试,e:/demo/test01/index.php
其中index.php的内容为:
<?php
echo "hello world";
?>
保存,在浏览器访问http://test01.com/test01/便可显示 "hello world" ;
注意,若是修改过默认端口,访问时要在域名后面加端口号,比如:http://test01.com:8080/test01/
- wampserver多站点配置
- WAMPServer多站点配置
- wampserver多站点配置
- WampServer多站点配置
- wampserver多站点配置
- wampserver配置多站点
- WAMPServer多站点配置
- wampserver配置多站点
- wampserver配置多站点
- wampserver多站点配置
- wampServer多站点配置
- WAMPServer多站点配置
- WAMPServer多站点配置
- wampserver配置多个站点
- wampserver配置多个站点
- wampserver配置多个站点
- WAMPSERVER 环境架设教程(多站点配置)
- WAMPSERVER 环境架设教程(多站点配置)
- 兼容性
- Spring3 MVC请求参数获取的几种方法
- POJ3191【(-2)进制本质】
- 监控应用层通信_hook_kifastcallentry(系统服务调用)
- 用maven搭建SpringMVC框架(二)
- wampServer多站点配置
- 1032. Sharing (25)
- 《未来简史》读书笔记
- mysql杂记
- android学习记录2:DatePicker的使用及设置其主题
- 鸡年寄语
- java中volatile关键字的含义
- 华为机试--素数伴侣
- 【Theano】环境配置——“g++ not detected”