mac 配置虚拟主机出现如下错误:
Forbidden
You don't have permission to access / on this server.
Server unable to read htaccess file, denying access to be safe
apache版本2.4.*
百度了很多答案始终没有解决
我尝试修改apache配置文件(httpd.conf)
Require all none -> Require all granted
AllowOverride none -> AllowOverride all
【失败】
尝试添加:
<Directory "project/path">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
【失败】
接着我以为是权限问题,我将目录权限修改为777
chomd -R 777 project_directory
【失败】
我确实不知道该怎么办了,依然出现这个问题。
学会查看日志,去apache的error log一看便知