linux 下 安装 XAMMP 后无法使用phpmyadmin的问题解决
一直都在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!
呵呵,能够成功解决这一问题,真的是非常高兴啊。