在本地机器上对.htaccess进行AllowOverride,给出403 Forbidden



我有一个mod_rewrite我想在我的mac本地使用,但当我改变我的配置在我的目录标签我得到一个403禁止错误。我已经尝试了所有其他的解决方案,但没有运气。

也许有人会看到我没有看到的东西…

代码如下:

httpd . conf

<Directory />
    Options FollowSymLinks
    AllowOverride All
    Order deny,allow
    Deny from all
</Directory>
<Directory "/Library/WebServer/Documents/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

被myusername.conf

覆盖
<Directory /Users/adrianmaurer/Sites/www>
    Options Indexes MultiViews FollowSymLinks ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

虚拟主机文件httpd-vhosts.conf

<VirtualHost *:80>
DocumentRoot /Library/WebServer/Documents
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
    DocumentRoot /Users/adrianmaurer/Sites/www
    ServerName myserver.dev
</VirtualHost>

我能够通过设置我的/etc/apache2/users/username.conf文件来修复它(注意你必须改变选项行,而不仅仅是AllowOverride):

<Directory "/Users/tlhunter/Sites/">
    Options All               
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

最新更新