xampp只允许本地访问,禁止远程访问
远程访问phpmyadmin的时候出现错误
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的安全配置只允许本地网络的访问请求,需要配置httpd-xampp.conf,打开这个文件,找到
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
注释掉里面的
# Require local
如果没有,就在最后添加下面这段配置文件,这个是最省事儿的办法(还有一种方法,见方法二,下面的方法都是建立在没有找到上面的配置文件的情况下的)
方法一:
#
# 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 \
fe80::/10 169.254.0.0/16
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
方法二:
找到
<Directory "D:/xampp/phpmyadmin">
AllowOverride AuthConfig
Require all granted
</Directory>
修改为
<Directory "D:/xampp/phpmyadmin">
AllowOverride AuthConfig
Allow from all
Require all granted
</Directory>
Original article, please indicate the source:http://develop.cnblogs.com
Mail:NeiTe@qq.com