为什么我不能在 localhost 上访问 Xampp 的 phpmyadmin?禁止访问. [英] Why can't I access Xampp's phpmyadmin on localhost? Access is forbidden.

查看:31
本文介绍了为什么我不能在 localhost 上访问 Xampp 的 phpmyadmin?禁止访问.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在 ubuntu 上使用 phpmyadmin 在 Xampp 上访问 localhost.我可以看到我完全清除并为之编写的/htdocs 的内容.我想访问phpmyadmin,但是不能.

I can access localhost fine on Xampp with phpmyadmin on ubuntu. I can see the contents of /htdocs which I completely cleared and wrote my own for. I want to access phpmyadmin, but cannot.

在加载 phomyadmin 时,我收到 403 错误和一条建议我在文件 httpd-xampp.conf 中配置设置的说明.我查看了 /opt/lampp/etc/extra/httpd-xampp.conf,但不知道要配置什么.

When loading phomyadmin, I am greeted by a 403 Error and a note advising me to configure the setting in the file httpd-xampp.conf. I looked in /opt/lampp/etc/extra/httpd-xampp.conf, but have no idea what to configure.

文件中的两个区域在这种情况下似乎很有用:

Two areas within the file seem useful in this scenario:

<Directoy "/opt/lampp/phpmyadmin">
    AllowOverride AuthConfig Limit
    Order allow,deny
    Deny From all
</Directory>

#
# New XAMPP security concept
#

<LocationMatch "^/(?: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 
    fe00::/10 169.254.0.0/16

    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

在这两个部分中,我尝试将全部拒绝"更改为全部允许"并使用命令 sudo/opt/lampp/lampp restart 重新启动 Xampp.我收到了与以前相同的错误页面.我尝试了网上找到的其他解决方案,但都没有奏效.

In both segments I tried changing "Deny from all" to "Allow from all" and restarted Xampp with the command sudo /opt/lampp/lampp restart. I received the same error page as before. I tried other solutions found online, but none have worked.

我必须配置什么才能访问 phpmyadmin?

What do I have to configure to access phpmyadmin?

推荐答案

解决方案可以在这里找到.总结如下:

编辑/opt/lampp/etc/extra/httpd-xampp.conf.

<Directory "/opt/lampp/phpmyadmin">块的底部添加Require all grant行,如下:

Add the line Require all granted to the bottom of the <Directory "/opt/lampp/phpmyadmin"> block as follows:

<Directory "/opt/lampp/phpmyadmin">
  AllowOverride AuthConfig Limit
  Order allow,deny
  Allow from all
  Require all granted
</Directory>

这篇关于为什么我不能在 localhost 上访问 Xampp 的 phpmyadmin?禁止访问.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆