我试图为家庭开发设置 Xampp。它安装正确,我可以访问 xampp 页面,如演示、安全、状态......甚至使用 phytin-gui 来启动和停止服务器。
但是,当使用“ http://localhost/phpmyadmin ”访问 phpMyAdmin 时,我得到下一个错误:
Access forbidden!
New XAMPP security concept:
Access to the requested directory is only available from the local network.
This setting can be configured in the file "httpd-xampp.conf".
我检查了我的 httpd-xampp.conf 并且似乎是正确的。我试图将拒绝全部更改为允许全部但不起作用。
我的主机文件将 localhost 指向 127.0.0.1,这是访问所有 xampp 文件的预期目标。
我在 ubuntu 12.04 机器上运行 XAMPP 1.8.1
有同样问题的人吗?我失去了将近 2 小时的谷歌搜索,但我发现的所有结果是,当尝试从其他网络或机器访问服务器时会发生此错误。但对我来说,情况是我直接在服务器上工作,所以它假设我可以默认访问 phpMyAdmin。
我的 httpd-xampp.conf
#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
fe80::/10 169.254.0.0/16
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>