服务器端装好XAMPP并启动服务后,在机器浏览器上输入localhost可以打开XAMPP管理页面,但是在我的笔记本上输入服务器IP后却无法打开,提示: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".
于是找到XAMPP安装路径C:\xampp\apache\conf\extra,打开文件httpd-xampp.conf,在文件最后,找到相关位置,修改为如下:
<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 \
fe80::/10 169.254.0.0/16
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
保存退出,然后重启Apache服务,在笔记本上刷新IP即可打开。
原文:http://helpdesk.blog.51cto.com/219783/1533792