在DocumentRoot
上为我的httpd-vhosts
文件取得403错误。 'Apache 403禁止全部允许<Directory> - 虚拟主机
注:我在MAC OSX塞拉利昂10.12
我下面的教程是here - 按照指示我跑chmod 755 /sites/blog/my-website/web
但它并没有解决问题。我也跑sudo
,但没有成功。
注意我刷新我的缓存和运行chmod
用下面的命令重新启动后,重要的是:
sudo apachectl restart
dscacheutil -flushcache
在httpd.conf文件中,我有以下行注释掉(再次按教程指示):
# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf
我的httpd-vhosts.conf
配置如下:
<VirtualHost *:80>
DocumentRoot "/sites"
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/sites/blog/my-website/web"
ServerName mywebsite.dev
ErrorLog "/private/var/log/apache2/connor.local-error_log"
CustomLog "/private/var/log/apache2/connor.local-access_log" common
<Directory "/sites/blog/my-website/web">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
任何想法我可能做错了什么?如果需要更多信息,请告诉我。
没错它就是添加
Require all granted
启用该功能的...我发现我的答案在那里。 – kawnah