xampp IP访问出现New XAMPP security concept解决办法
今天在虚拟机Ubuntu系统上安装XAMPP,通过127.0.0.1/localhost访问出现以下错误:
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这个文件,xampp默认安装路径在/opt/lampp/etc/extra,找到这个文件进行修改。
解决办法如下:
方法(1)、找到如下语句:
<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>
将Deny from all注释掉:
#Deny from all
然后重启XAMPP:/opt/lampp/lanmpp/ restart
方法(2)、找到如下语句:
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))"> Require local ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var </LocationMatch>
将Require local注释掉:
#Require local
然后重启XAMPP:/opt/lampp/lanmpp/ restart
以上就是解决方法,大家可以试一试。
共有 0 条评论