apache 虚拟主机配置有关问题

apache 虚拟主机配置有关问题

apache 虚拟主机配置问题

我想在本机上配置两个虚拟主机如下


NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1>
ServerName  www.hanxinxin.com
DocumentRoot  D:/hanxinxin/
DirectoryIndex index.php
<Directory "D:hanxinxin">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost 127.0.0.1>
ServerName  www.boke.com
DocumentRoot  D:/hanxinxin/wordpress/
DirectoryIndex index.php
<Directory "D:hanxinxinwordpress">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

hosts文件添加如下



127.0.0.1       localhost
127.0.0.1       www.hanxinxin.com
127.0.0.1       www.boke.com

当我在浏览器里输入www.hanxinxin.com时浏览器能访问D:hanxinxin目录下的index.php


可是我输入www.boke.com时却到了xampp安装目录D:xampphtdocs下的index.php这是为什么哇

分享到:




重启apache没有?

apache 虚拟主机配置有关问题

相关文章:

你感兴趣的文章:

标签云: