微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

ubuntu – Xampp:我无法从localhost访问phpMyAdmin

我试图建立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>

解决方法

如果您在/ opt下安装了XAMPP,请转至/ opt / lampp / etc / extra目录,并编辑httpd-xampp.conf以添加Require all grant,如下所示:

# since XAMPP 1.4.3
<Directory "/opt/lampp/PHPmyadmin">
    AllowOverride AuthConfig Limit
    Order allow,deny
    Allow from all
    Require all granted
</Directory>

您可能必须通过运行/ opt / lampp / lampp restart重新启动LAMPP服务器.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐