当我尝试使用的IP地址在另一台PC访问XAMPP的phpMyAdmin的我得到这个错误:XAMPP - 访问请求的对象只能从本地网络
Access forbidden!
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".
我正在寻找解决方案并发现一些建议,如修改httpd-xampp.conf
文件。
1)选项是修改<LocationMatch>
块这样的:
<LocationMatch "^/(?i(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Allow from all
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
的问题是,我httpd-xampp.conf
文件不包含这样的块,但如果我尝试将其添加到文件I结束仍然会得到相同的错误。
2)选项是修改<Directory "C:/xampp/phpMyAdmin">
如下:
<Directory "C:/xampp/phpMyAdmin">
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
Require all granted
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>
或者
<Directory "C:/xampp/phpMyAdmin">
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>
或者
<Directory "C:/xampp/phpMyAdmin">
AllowOverride AuthConfig Limit
Require all granted
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>
这并没有解决任何问题。仍然有相同的错误。
P.S.每次更改后我都会重新启动Apache!
有人可以看到我可能会失踪?
不要在同一配置中同时使用Apache 2.2和Apache 2.4语法 – RiggsFolly
我一次只使用一个,仍然出错 –
不在选项2中,您不需要。使用“允许允许,拒绝全部允许”(Apache 2。2语法)或'要求所有授予'(Apache 2.4语法) – RiggsFolly