mac apache2.4.* 配置虚拟主机Forbidden

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

【失败】

我确实不知道该怎么办了,依然出现这个问题。

阅读 3.5k
1 个回答

学会查看日志,去apache的error log一看便知

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题