首页 > 其他 > 详细

配置虚拟主机

时间:2017-04-07 10:14:32      阅读:201      评论:0      收藏:0      [点我收藏+]

把网站配置成虚拟主机 域名为 www.my.com

 

具体步骤如下:比如讲apache服务器127.0.0.1 配置成 www.sohu.com

  1. 首先在http.conf文件中 做如下处理:

①关闭默认的 #DocumentRoot "C:/Apache2.2/htdocs“

②启用httpd-vhosts.conf文件 

# Virtual hosts 启用主机配置文件

Include conf/extra/httpd-vhosts.conf

2.windows/system32/dirvers/etc/hosts文件中加入

127.0.0.1www.hanshunping.com

3.httpd-vhosts.conf文件中加入:

--简单配置方式

<VirtualHost 127.0.0.1:80>

    DocumentRoot "d:/myweb"

    DirectoryIndex my.html index.html index.htm index.php

    <Directory />

    Options FollowSymLinks

    AllowOverride None

    Order allow,deny

    Allow from all

    </Directory>

</VirtualHost>

配置虚拟主机

原文:http://www.cnblogs.com/kevinggk/p/6676254.html

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