Bitnami:出于安全原因,此 URL 只能使用本地主机 (127.0.0.1) 作为主机名访问

Bitnami: For security reasons, this URL is only accessible using localhost (127.0.0.1) as the hostname

无法访问 phpmyadmin:http://ip/phpmyadmin

它显示“出于安全原因,此 URL 只能使用本地主机 (127.0.0.1) 作为主机名访问。”

请建议我解决这个问题。

据我所知,要访问 phpmyadmin,您应该有一个本地服务器,它将 运行,如 wampp 或 xampp 服务器。 这就是为什么它要求您提供 127.0.0.1 (localhost)。 你想做什么?你能提供更多细节吗?

这里是 Bitnami 工程师,

出于安全原因,只有在使用 127.0.0.1 作为主机名时才能访问 phpMyAdmin。要从远程系统访问它,您必须创建一个 SSH 隧道,将请求从 127.0.0.1 路由到 Web 服务器。这意味着您必须能够通过 SSH 连接到您的服务器才能远程访问这些应用程序。

  • 在Windows中,您可以配置Putty或SSH客户端,您必须将所有请求重定向到您机器中特定端口(例如8888)的80端口远程机器。

  • 对于Unix系统,您可以使用此命令创建SSH隧道

ssh -N -L 8888:127.0.0.1:80 -i KEYFILE bitnami@SERVER-IP

然后在浏览器中使用http://localhost:8888/phpmyadmin

您可以在我们的文档中了解更多相关信息

https://docs.bitnami.com/aws/apps/wordpress/get-started/access-phpmyadmin/

通过修改配置文件解决

<IfVersion < 2.3 >
 Order allow,deny
#Allow from 127.0.0.1
 Allow from your_ip
 Satisfy all
</IfVersion>
<IfVersion >= 2.3>
#Require local
 Require all granted
</IfVersion>

编辑phpmyadmin conf文件
sudo nano /opt/bitnami/apache/conf/bitnami/phpmyadmin.conf 

并使用:

<Directory "/opt/bitnami/phpmyadmin">
Options -Indexes +FollowSymLinks -MultiViews
AllowOverride All
Require all granted
</Directory>