The reason why the xampp cannot be accessed by the external network
When a local area network or an external network accesses xampp, the following error is reported:
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".
Solution:
Open httpd-xampp.conf (/ xampp/apache/conf/extra/httpd-xampp.conf)
Find the following:
Version 1:
=
# New XAMPP security concept
#
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
Comment out the line Deny from all, that is
# Deny from all
=
Version 2:
=
# New XAMPP security concept
#
Require local
ErrorDocument 403 / error/XAMPP_FORBIDDEN.html.var
Comment out the line Require local, that is
# Require local
Note: apache needs to be restarted [/ opt/lampp/lampp restartapache]