+ -
当前位置:首页 → 问答吧 → apache 2.2.9 WIN下配置虚拟主机问题

apache 2.2.9 WIN下配置虚拟主机问题

时间:2008-07-26

来源:互联网

httpd-vhosts.conf配置如下:

NameVirtualHost 127.0.0.1:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#

<VirtualHost 127.0.0.1:80>
    ServerAdmin [email protected]
    DocumentRoot  "d:/www/blog"
    ServerName www.abc.com
</VirtualHost>

然后重启,访问www.kakee.net得到的地址是apache的htdoc的根目录,It's Work! 这个是怎么回事,

已经吧域名的 A记录指向了这个服务器的IP

httpd.conf主要配置:

Listen 80
ServerAdmin [email protected]


DocumentRoot "d:/www"

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

<Directory "d:/www">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

作者: hekey   发布时间: 2008-07-25

这个问题视乎很有难度哦?在3个论坛发贴都没有人解答出来的。.。。。 :sweat: :sweat:

作者: hekey   发布时间: 2008-07-26

<VirtualHost 127.0.0.1:80>这个地方的ip已经决定了你的域名会被解析到localhost下的目录,而xampp会指定localhost的目录为*:\xampp\htdoc下,所以其实你指定了域名,也只是访问了该目录,具体怎样改我也忘了。以前有教程,网上,可是现在百度都百度不了。晕死

作者: hbk100   发布时间: 2008-07-27

热门下载

更多