0
点赞
收藏
分享

微信扫一扫

You don‘t have permission to access this resource.

捡历史的小木板 2022-03-12 阅读 83

项目场景:

访问自己的搭建的网站时apache报错You don’t have permission to access this resource.


原因分析


解决方案:

apach/conf/httpd.conf文件修改如下:

<Directory />
    Options FollowSymLinks
    AllowOverride all
    Require local
</Directory>

修改为:

<Directory />
    Options FollowSymLinks
    AllowOverride none
    Require all granted
</Directory>

apach/conf/httpd-vhosts.conf文件修改如下:

<Directory />
<Directory "${INSTALL_DIR}/www/">
    Options FollowSymLinks
    AllowOverride all
    Require local
</Directory>
```bash
修改为:
<Directory />
<Directory "${INSTALL_DIR}/www/">
    Options FollowSymLinks
    AllowOverride all
    Require all granted
</Directory>
举报

相关推荐

0 条评论