* 配置前请做好备份工作
一、 在xampp 文件夹中搜素 httpd-xampp.conf 文件
二、编辑此文件 ,如下图:
# # New XAMPP security concept # <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 \ 81.196.40.94/32 ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var </LocationMatch> # Close XAMPP security section here <LocationMatch "^/(?i:(?:security))"> Order deny,allow # Deny from all Allow from ::1 127.0.0.0/8 ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var </LocationMatch> # Close XAMPP sites here <LocationMatch "^/(?i:(?:xampp|licenses|phpmyadmin|webalizer|server-status|server-info))"> Order deny,allow # Deny from all Allow from ::1 127.0.0.0/8 ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var </LocationMatch>
三、将Deny from all 注释掉: # Deny from all
四、 在xampp 控制面板中重启 apache
注:重启后就可以远程登录xampp了,默认的管理员的用户名是root,密码是自己在security时设置的密码,未设置密码默认为空