gpt4 book ai didi

php - XAMPP - 只能从本地网络访问所请求的对象

转载 作者:行者123 更新时间:2023-12-02 23:06:41 25 4
gpt4 key购买 nike

当我尝试使用 IP 地址访问另一台电脑上的 xampp 的 phpMyAdmin 时,出现此错误:

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>像这样的 block :

<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文件不包含这样的 block ,但如果我尝试将其添加到文件末尾,我仍然会收到相同的错误。

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>

这也没有解决问题。仍然遇到同样的错误。

附注每次更改后我都会重新启动 Apache!

有人可以看看我可能缺少什么吗?

最佳答案

我刚刚修好了!请前往:

<Directory "C:/xampp/phpMyAdmin">
AllowOverride AuthConfig
Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>

并更改所有内容如下:

<Directory "C:/xampp/phpMyAdmin">
AllowOverride AuthConfig Limit
Order allow,deny
Require all granted
Allow from all
</Directory>

关于php - XAMPP - 只能从本地网络访问所请求的对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43614783/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com