欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

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

程序员文章站 2022-03-15 22:34:54
...

Apche :2.4.23

系统:windows 10

集成环境:WAMP 64位

 

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

 

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

在其他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

相关标签: 服务器