打开网站的时候有出现"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";

<Directory />
	Options FollowSymLinks
	AllowOverride None
	Require all granted  #修改的是这里
</Directory>

<Directory /usr/share>
	AllowOverride None
	Require all granted
</Directory>

3、重启Apache生效

systemctl restart apache2

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

Q.E.D.