【发布时间】:2016-06-23 04:40:14
【问题描述】:
我正在我的 mac Mavericks 上设置一个本地站点。当我这样做时,我得到一个 500 错误。日志向我显示“.htaccess: IfModule not allowed here”中的错误。从我所看到的一切来看,它说让 AllowOverride ALL 来解决这个问题,但它对我不起作用。我知道我只是缺少一些简单的东西,所以任何建议都将不胜感激。
谢谢
下面是我的那个虚拟主机的 conf 文件。
<VirtualHost *:80>
DocumentRoot "/Users/Swany/Sites/test/public"
ServerName test.dev
ErrorLog "/private/var/log/apache2/test.dev-error_log"
CustomLog "/private/var/log/apache2/test.dev-access_log" common
<Directory "/Users/Swany/code/www/test/public">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
【问题讨论】:
-
如果我删除 .htaccess,我会得到主页,但如果我进入任何其他页面,我会得到 404。