被坑了,Apache多站点配置,本来配置的很正常的,结果电脑重装以后在配置结果就不行了,查了n久还是不行,但最后还是找到原因了.
httpd.conf 中这样的
<Directory />
AllowOverride none
Require all granted
</Directory>
改成下面这段
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
allow from all
</Directory>
还有一处地方,就是这个地方找了n久,大家如果出现上面改了还是403的话,下面这段也改改看吧.
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
Allow from localhost
</Directory>
改成下面这段
Order Deny,Allow
allow from all
Allow from 127.0.0.1
Allow from ::1
Allow from localhost
</Directory>
最主要的就是Deny from all 这玩意,改完后在看看有没有这个玩意了,有就把它改成allow from all这个基本就可以了.
提示You don't have permission to access /index.php on this server.
时间: 2024-10-20 06:16:17