Apache2.4 Forbidden You don't have permission to access / on this server.

Apche :2.4.23

系统:windows 10

集成环境:WAMP 64位

安装WAMP在windows 10上  ,在127.0.0.1上访问网页无压力

在其他IP下出现:Forbidden You don't have permission to access / on this server. 403错误

这个是服务器权限配置问题:

打开Apche 目录,例如:d:\wamp64\bin\apache\apache2.4.23\conf\extra

找到httpd-vhosts.conf文件:

# Virtual Hosts
#

<VirtualHost *:80>
	ServerName localhost
	DocumentRoot d:/wamp64/www
	<Directory  "d:/wamp64/www/">
		Options +Indexes +Includes +FollowSymLinks +MultiViews
		AllowOverride All
		Require local
	</Directory>
</VirtualHost>
#

把Require local 改成 Require all granted

改好后:

# Virtual Hosts
#

<VirtualHost *:80>
	ServerName localhost
	DocumentRoot d:/wamp64/www
	<Directory  "d:/wamp64/www/">
		Options +Indexes +Includes +FollowSymLinks +MultiViews
		AllowOverride All
		Require all granted
	</Directory>
</VirtualHost>
#

建议一步一步手动配置apche,会对服务器有更了解。

参考资料: https://blog.csdn.net/yt3dklts/article/details/50709222

猜你喜欢

转载自blog.csdn.net/Rocarrot/article/details/81352712
今日推荐