【发布时间】:2012-11-25 07:24:40
【问题描述】:
我设置了运行 apache 的 XAMPP 并尝试设置虚拟主机,但它不起作用,我一直被路由到 XAMPP 启动页面。 http://localhost/index.html 说“它有效!”
我取消了注释 vhost_alias 模块、httpd-vhosts 和 rewrite_module 的地方。
我还在我的 httpd-vhosts.conf 和 httpd.conf 文件中添加了以下内容:
<Directory "C:/Sites/test.dev-web">
Allow From All
AllowOverride FileInfo
Options +FollowSymLinks
</Directory>
<VirtualHost *:80>
ServerName "test.dev-web"
DocumentRoot "C:/Sites/test.dev-web"
</VirtualHost>
我还将它添加到我的 system32\drivers\etc 中的 hosts 文件中:
127.0.0.1 test.dev
我在那个文件中也有127.0.0.1 localhost
但是,每当我在 chrome 中输入 test.dev 时,它都会将我带到 xampp 启动页面 (test.dev/xampp)。
运行 Windows 7 和 XAMPP 1.7.4
XAMPP 说 apache 正在控制面板上运行。 我关闭了所有可能运行端口 80(Skype)的程序
有什么想法吗?
【问题讨论】:
标签: windows xampp virtualhost