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

远程访问phpmyadmin的时候出现错误php

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,打开这个文件,找到 html

<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">

注释掉里面的web

# 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>

方法二:ide

找到ui

<Directory "D:/xampp/phpmyadmin"> AllowOverride AuthConfig Require all granted </Directory>

修改成spa

<Directory "D:/xampp/phpmyadmin"> AllowOverride AuthConfig Allow from all Require all granted </Directory>
相关文章
相关标签/搜索