linux – 为什么不能在localhost上访问Xampp的phpmyadmin?禁止访问.

前端之家收集整理的这篇文章主要介绍了linux – 为什么不能在localhost上访问Xampp的phpmyadmin?禁止访问.前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我可以使用ubuntu上的PHPmyadmin在Xampp上访问localhost.我可以看到我完全清除并写我自己的/ htdocs的内容.我想访问PHPmyadmin,但不能.

当加载phomyadmin时,我遇到了403错误,并提示我建议在文件httpd-xampp.conf中配置设置.我查看了/opt/lampp/etc/extra/httpd-xampp.conf,但不知道要配置什么.

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

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

@H_403_6@# # 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重新启动重新启动Xampp.我收到与以前相同的错误页面.我尝试过在网上找到的其他解决方案,但没有一个工作.

我必须配置哪些访问PHPmyadmin?

解决方法

The solution can be found here.总结如下:

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

添加行要求全部授予< Directory“/ opt / lampp / PHPmyadmin”>的底部.块如下:

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

猜你在找的Linux相关文章