记录解决Apache提示”You don’t have permission to access…”错误

主机教程评论字数 363阅读模式

今天大鸟帮助一个网友将网站目录从/var/www/目录移动到/home/目录中,服务器采用的是Apache,根据惯例将/home/目录中对应mkdir创建网站文件目录和日志目录,以及将Apache配置文件DocumentRoot目录修改成新的文件夹地址。

其次,在重启Apache之后启动也算正常没有报错,但是打开网站的时候有出现"You don't have permission to access /index.php on this server."错误提示,看意思应该是权限问题。

记录解决Apache提示”You don’t have permission to access…”错误

具体的解决方法:

1、修改"apache2.conf"配置文件;

2、将"Require all denied"修改成"Require all granted";

记录解决Apache提示”You don’t have permission to access…”错误

3、重启Apache生效

systemctl restart apache2

最后,刷新页面可以看到正常可以访问。

weinxin
我的微信
微信公众号
关注大鸟博客公众号
 
大鸟
  • DocumentRoot
  • Apache
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定