linux 下 安装 XAMMP 后无法使用phpmyadmin的问题解决

本文介绍了解决 Ubuntu 下 XAMPP 安装后 PHPMyAdmin 无法访问的问题。通过修改 httpd-xampp.conf 文件并加入 requireallgranted 语句,实现了本地网络对 PHPMyAdmin 的正常访问。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一直都在windows下使用wamp,今天尝试着在ubuntu下装了XAMMP,安装倒是很简单,可是安装完后发现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(opt/lampp/etc/extra/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 \
81.196.40.94/32
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
------------------------------------------------------------------------------------------------------------------------------

加上这么一句话

require all granted

变成:

-----------------------------------------------------------------------------------------------------------------------------
# New XAMPP security concept
#
<LocationMatch “^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))”>
Order deny,allow
Deny from all

require all granted
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 \
81.196.40.94/32
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
------------------------------------------------------------------------------------------------------------------------------

 

 

 

重启apache[/opt/lampp/lampp restartapache],OK!

呵呵,能够成功解决这一问题,真的是非常高兴啊。

 

转载于:https://www.cnblogs.com/maplecumt/archive/2012/09/11/2680361.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值