XAMPP非本地访问被拒绝解决办法

问题场景:

  本机搭建一个apache服务器,正常访问XAMPP目录下的页面。

  手机接入同一wifi,以电脑ip方式访问该目录下的页面;提示:Access Denied

  Access to the requested directory is only available from the local network.
This setting can be configured in the file “httpd-xampp.conf”.   

解决办法:

  1、按照提示找到httpd-xampp.conf文件,路径在“/xampp/apache/conf/extra/httpd-xampp.conf”

  2、文本编辑器打开文件,找到配置项:New XAMPP security concept

  3、注释原来的配置修改为允许访问。

  

#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
#Require local
AllowOverride AuthConfig
Require all granted
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

原文地址:https://www.cnblogs.com/linkxu1989/p/6962302.html