【发布时间】:2013-01-04 04:53:01
【问题描述】:
我在 Windows 7 上使用 WAMP
已经制作了zf2-tutorial.localhost的别名,添加到drivers/etc/hosts 还启用了虚拟主机设置:
Include conf/extra/httpd-vhosts.conf
已经根据这个在这个文件中设置了我的别名
<VirtualHost *:80>
ServerName zf2-tutorial.localhost
DocumentRoot /path/to/zf2-tutorial/public
SetEnv APPLICATION_ENV "development"
<Directory /path/to/zf2-tutorial/public>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
当我打开 zf2-tutorial.localhost 时,它会按预期显示 zend 页面。但是当我试图打开 localhost 页面时,它会显示:
Forbidden
You don't have permission to access / on this server.
在 httpd.conf 中禁用虚拟主机,允许打开 localhost 但无法打开 zf2-tutorial.localhost
【问题讨论】:
标签: php mod-rewrite localhost wamp alias