无法使用 WAMP 浏览虚拟主机

Unable to browse virtual host with WAMP

我正在开发一个最终将托管在 Linux 盒子上的网站。我决定使用 WAMP 作为我的开发服务器,这样我就可以确保我所有的 Angular.js 路由等都正常工作。

我已经启动了 WAMP 并且 运行(漂亮的绿色托盘图标)。选择了 vhosts 模块。我已将以下内容添加到 httpd-vhosts.conf:

# mergable.local
<VirtualHost *:80>
    ServerAdmin mike@mahony.us
    DocumentRoot "D:/Main/source/mergable"
    ServerName mergable.local
    ServerAlias www.mergable.local
    ErrorLog "logs/mergable.local-error.log"
    CustomLog "logs/mergable.local-access.log" common
    <Directory "/">
        Deny from all
        Allow from 127.0.0.1
    </Directory>
</VirtualHost>

我还在主机文件中添加了以下内容:

127.0.0.1       localhost
127.0.0.1       mergable.local
127.0.0.1   www.mergable.local

当我浏览到 http://www.mergable.local 时,我看到了 WAMP 配置页面。对我做错了什么有什么想法吗?

检查您的 apache\conf\httpd.conf 文件是否有

#LoadModule vhost_alias_module modules/mod_vhost_alias.so

# Virtual hosts
#Include conf/extra/httpd-vhosts.conf

如果在 LoadModuleInclude 之前有 # 将其删除,这样虚拟主机配置文件将 运行.