You don't have permission to access / onthis server.
Apache/2.4.23 (Win64) PHP/5.6.25 Server at 10.10.10.10 Port 80错误。
![Forbidden](https://www.hndn.net/file/upload/202109/10/160257242.jpg)
经过一番百度查询后,找到原因定位到Apache配置文件httpd-vhosts.conf虚拟机配置文件。发现配置文件里有AllowOverride none,Require local。
![AllowOverride none](https://www.hndn.net/file/upload/202109/10/160257352.png)
AllowOverride参数就是指明Apache服务器是否去找.htacess文件作为配置文件,如果设置为none,那么服务器将忽略.htacess文件,如果设置为All,那么所有在.htaccess文件里有的指令都将被重写。
Require local大致意思就是只允许本地服务器访问。
解决方法:
把AllowOverride none 改为AllowOverrideall。
把Require local删掉或用#注释掉
添加Require all granted这条语句,意思是允许所有请求访问资源。
![添加Require all granted这条语句](https://www.hndn.net/file/upload/202109/10/160257482.jpg)