wamp2.5虚拟站点建立
2015-11-19 23:15
316 查看
1. D:\wamp\bin\apache\Apache2.2.21\conf 目录下打开httpd.conf修改以下几个地方。(软件安装在D盘)
(1)178行DocumentRoot "E:/www/" //修改网站路径
(2)192行 #Deny from all
Allow from all //允许所有用户访问
(3)206行 <Directory "E:/www/"> //修改网站路径
(4)234行 #Deny from all
Allow from all //允许所有用户访问
(5)468行 #Include conf/extra/httpd-vhosts.conf //去掉前面的#号
2 D:\wamp\bin\apache\Apache2.2.21\conf\extra下httpd-vhosts.conf文件复制如下文件到最后面(27-34行),并修改其中三行。包括盘幅和域名。
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "c:/Apache2/docs/dummy-host.example.com"
ServerName dummy-host.example.com
ServerAlias www.dummy-host.example.com
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "E:/www/study"
ServerName styudy.com
ServerAlias www.study.com
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>
3. C:\Windows\System32\drivers\etc 目录下hosts 最下面加入如下语句
127.0.0.1 study.com
127.0.0.1 www.study.com //使域名与ip对应 (此处域名与2中的设置名字相同)
(1)178行DocumentRoot "E:/www/" //修改网站路径
(2)192行 #Deny from all
Allow from all //允许所有用户访问
(3)206行 <Directory "E:/www/"> //修改网站路径
(4)234行 #Deny from all
Allow from all //允许所有用户访问
(5)468行 #Include conf/extra/httpd-vhosts.conf //去掉前面的#号
2 D:\wamp\bin\apache\Apache2.2.21\conf\extra下httpd-vhosts.conf文件复制如下文件到最后面(27-34行),并修改其中三行。包括盘幅和域名。
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "c:/Apache2/docs/dummy-host.example.com"
ServerName dummy-host.example.com
ServerAlias www.dummy-host.example.com
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "E:/www/study"
ServerName styudy.com
ServerAlias www.study.com
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>
3. C:\Windows\System32\drivers\etc 目录下hosts 最下面加入如下语句
127.0.0.1 study.com
127.0.0.1 www.study.com //使域名与ip对应 (此处域名与2中的设置名字相同)
相关文章推荐
- [C++] NEW Advanced Usage
- headroom.js 用例,漂亮完善的 鼠标滚动 --->导航栏隐藏显示效果
- SRM 670 div2 A BearSong
- os 模块
- Android Studio | 一个优雅的安卓开发环境
- java集合框架
- 第23篇 js快速学习知识
- poj 3372 完全剩余系
- PrimeFaces 核心源码 js
- zoj1003 crashing balloon
- 关于字符串读入
- (android:windowIsTranslucent)影响(android:windowAnimationStyle)Activity切换动画无效
- Tip提示框另类写法
- oracle表空间查询sql
- Hashtable原理解析
- Java中的关键字static
- Myeclipse中console的背景颜色设置
- HTTP协议详解
- strcat 的自我延伸实现(strncat)!!
- 连接协议