无法连接到 AWS 托管的 Bitnami 实例中的 phpmyadmin [英] Can't connect to phpmyadmin in Bitnami instance hosted by AWS

查看:24
本文介绍了无法连接到 AWS 托管的 Bitnami 实例中的 phpmyadmin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过公共 DNS 连接到 phpmyadmin,但似乎无法正常工作.

我已尝试按照以下说明进行操作:

无法访问 PHPMyAdmin

<块引用>

默认情况下,phpMyAdmin 仅限于本地主机.如果你想让它成为可以从任何地方访问,您应该按照如何启用 phpMyAdmin 或 phpPgAdmin?"在虚拟机中的常见问题解答:

SSH 到实例 将Allow from 127.0.0.1"行替换为文件中的全部允许"/opt/bitnami/apps/phpmyadmin/conf/phpmyadmin.conf 重启apache:sudo/opt/bitnami/ctlscript.sh 重启apache

这个解决方案的问题是我在那个目录中没有 phpmyadmin.conf 文件.我发现这与 phpmyadmin 文件夹中不存在 phpmyadmin.conf,但我无法访问.

<块引用>

检查/opt/bitnami/apps/phpmyadmin/htdocs/config.inc.php 和使用您的 URL 更改$cfg[‘PmaAbsoluteUri’]"选项.

我仍然得到相同的 出于安全原因,此 URL 只能使用 localhost (127.0.0.1) 作为主机名访问 错误,这让我很生气.

有什么想法吗?如果需要,我可以随时发布配置文件中的相关内容.

解决方案

在看这篇文章时 (如何启用远程访问 phpMyAdmin 或 phpPgAdmin?),我需要查看虚拟机,而不是亚马逊云/Bitnami Hosting.

当我将 /opt/bitnami/apps/phpmyadmin/conf/httpd-app.conf 文件更改为以下内容时,我可以通过 [PUBLIC_DNS/YOUR_DOMAIN_NAME/IP]/phpmyadmin 访问].

主要变化是:

<块引用>

允许所有

<块引用>

要求所有授予

更改后,记得重启apache服务器.(或重启您的实例)

<块引用>

sudo/opt/bitnami/ctlscript.sh 重启apache

/opt/bitnami/apps/phpmyadmin/conf/httpd-app.conf

<目录/opt/bitnami/apps/phpmyadmin/htdocs"># AuthType 基本# AuthName phpMyAdmin# AuthUserFile "/opt/bitnami/apache2/users"# 需要有效用户允许覆盖无<IfModule php5_module>php_value upload_max_filesize 80Mphp_value post_max_size 80M</IfModule><IfVersion <2.3 >命令允许,拒绝所有人都允许满足所有</IfVersion><IfVersion >= 2.3>要求所有授予</IfVersion>错误文档 403出于安全原因,只能使用 localhost (127.0.0.1) 作为主机名访问此 URL"</目录>

文档参考:https://docs.bitnami.com/virtual-machine/组件/phpmyadmin/

I'm trying to connect to phpmyadmin through my Public DNS and I can't seem to get it to work.

I've tried following these directions:

Can't Access PHPMyAdmin

By default phpMyAdmin is restricted to localhost. If you want it to be accessible from anywhere you should follow the steps described in "How to enable phpMyAdmin or phpPgAdmin?" in virtual machines FAQ:

SSH to the instance Replace the line "Allow from 127.0.0.1" with "Allow from all" in the file /opt/bitnami/apps/phpmyadmin/conf/phpmyadmin.conf Restart apache: sudo /opt/bitnami/ctlscript.sh restart apache

The problem with this solution is that I don't have a phpmyadmin.conf file in that directory. I found this pertaining to that Phpmyadmin.conf does not exist in the phpmyadmin folder, but that didn't allow me to access.

Check the /opt/bitnami/apps/phpmyadmin/htdocs/config.inc.php and change the "$cfg[‘PmaAbsoluteUri’]" option with your URL.

I'm still getting the same For security reasons, this URL is only accesible using localhost (127.0.0.1) as the hostname error and it's driving me mad.

Any ideas? If needed, I can readily post relevant content from configuration files.

解决方案

When looking at this article (How to enable phpMyAdmin or phpPgAdmin to be accessed remotely?), I needed to be looking at Virtual Machine and not Amazon cloud / Bitnami Hosting.

When I changed the /opt/bitnami/apps/phpmyadmin/conf/httpd-app.conf file to the following, I was able to access via [PUBLIC_DNS/YOUR_DOMAIN_NAME/IP]/phpmyadmin].

Main changes being:

Allow from all

and

Require all granted

After the changes, remember to restart apache server. (or reboot your instance)

sudo /opt/bitnami/ctlscript.sh restart apache

/opt/bitnami/apps/phpmyadmin/conf/httpd-app.conf

<Directory "/opt/bitnami/apps/phpmyadmin/htdocs">
# AuthType Basic
# AuthName phpMyAdmin
# AuthUserFile "/opt/bitnami/apache2/users"
# Require valid-user
AllowOverride None

<IfModule php5_module>
        php_value upload_max_filesize 80M
php_value post_max_size 80M
</IfModule>

<IfVersion < 2.3 >
Order allow,deny
Allow from all
Satisfy all
</IfVersion>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
ErrorDocument 403 "For security reasons, this URL is only accesible using localhost (127.0.0.1) as the hostname"
</Directory>

Docs Ref: https://docs.bitnami.com/virtual-machine/components/phpmyadmin/

这篇关于无法连接到 AWS 托管的 Bitnami 实例中的 phpmyadmin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆