首页 > 其他 > 详细

WAMP环境下配置虚拟主机

时间:2016-01-23 23:09:52      阅读:212      评论:0      收藏:0      [点我收藏+]

1.编辑httpd.conf,查找#Include conf/extra/httpd-vhosts.conf,把前面注释符号“#”删掉

2.编辑httpd-vhosts.conf文件,

<VirtualHost *:80>
ServerName www.xxx.com     //服务器名/虚拟机名
ServerAlias dt.com         //别名
DocumentRoot E:/dt/public    //文件根目录
DirectoryIndex index.php index.html index.htm
<Directory E:/dt/public>    //文件目录
Options +Includes -Indexes
AllowOverride All
Order Deny,Allow
Require all granted
</Directory>
</VirtualHost>

3. 修改C:/WINDOWS/system32/drivers/etc/host这个文件,用记事本或编辑器打开

  加上127.0.0.1 www.xxx.com

4.重启apache

虚拟主机就配置成功了

WAMP环境下配置虚拟主机

原文:http://www.cnblogs.com/wuheng1991/p/5154165.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!