linux下解决非本机访问出现的提示

安装完毕之后发现无法用IP访问,出现以下提示

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".


网上通过注释掉Deny from all的方法对于新版本的Xampp来说并不奏效

解决办法依然是打开httpd-xampp.conf文件,文件目录:/opt/lampp/etc/extra/

找到


#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Require localhost
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
将其中的"Require localhost"改为"Require all granted"

保存,重启Xampp即可~

原文地址:https://www.cnblogs.com/zxcnn/p/10421770.html