window服务器wamp解决forbidden错误

来源:https://blog.csdn.net/talen123/article/details/53193296

在window服务器上用wamp搭建完环境后,输入IP地址,出现Forbidden

You don't have permission to access / onthis server.

Apache/2.4.23 (Win64) PHP/5.6.25 Server at123.207.226.239 Port 80

错误。


在网上查询后,定位到Apache配置文件httpd-vhosts.conf虚拟机配置文件。发现配置文件里有AllowOverridenone,Require local。


AllowOverride参数就是指明Apache服务器是否去找.htacess文件作为配置文件,如果设置为none,那么服务器将忽略.htacess文件,如果设置为All,那么所有在.htaccess文件里有的指令都将被重写。

Require local大致意思就是只允许本地服务器访问。

解决方法:

扫描二维码关注公众号,回复: 3314112 查看本文章

把AllowOverride none 改为AllowOverrideall。

把Require local删掉或用#注释掉

添加Require all granted这条语句,意思是允许所有请求访问资源。

猜你喜欢

转载自blog.csdn.net/binglong_world/article/details/80940732