项目场景:
访问自己的搭建的网站时apache报错You don’t have permission to access this resource.
原因分析
遇到如标题那个问题,无法进行远程HTTP请求
解决方案:
需要修改nttpd.conf和httpd-vhosts.conf,分别如下:
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>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)