码迷,mamicode.com
首页 > 其他好文 > 详细

xampp只允许本地访问,禁止远程访问

时间:2015-01-12 20:47:03      阅读:606      评论:0      收藏:0      [点我收藏+]

标签:

远程访问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>

xampp只允许本地访问,禁止远程访问

标签:

原文地址:http://www.cnblogs.com/develop/p/4219542.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!