xampp 访问出现New XAMPP security concept

搭建好xampp,输入网址http://192.168.110.205/xampp/,报错如下:

New XAMPP security concept:

Access to the requested object is only available from the local network.

This setting can be configured in the file "httpd-xampp.conf".


 

If you think this is a server error, please contact the webmaster.

Error 403

192.168.110.205
Apache/2.4.9 (Unix) OpenSSL/1.0.1g PHP/5.4.27 mod_perl/2.0.8-dev Perl/v5.16.3

 

 

 

 

解决方法:

打开httpd-xampp.conf(/xampp/apache/conf/extra/httpd-xampp.conf)(注:我的文件路径在/opt/lampp/etc/extra/httpd-xampp.conf,通过locate 文件名或者find可以查找到)


# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
    Order deny,allow
   #Deny from all
    Allow from 127.0.0.0/8
    ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>

注:Deny from all注释掉,变成: #Deny from all

注:需要重启apache[/opt/lampp/lampp restartapache]

就可以远程登录xampp了,通过外网登陆本地xampp了。

--------------------------------------------------------------------------------

新版本可能是用下面的这个方法:

# Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
正解方法是注掉本地访问这行,如下: 
#Require local
最后,重启启动lampp,

posted @ 2019-03-15 18:22  yangtou45du  阅读(293)  评论(0编辑  收藏  举报