當我嘗試使用的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