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

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

问题描述

我正在尝试通过我的公共DNS连接到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:

无法访问PHPMyAdmin

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

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到实例将"Allow from 127.0.0.1"行替换为 文件中的全部允许" /opt/bitnami/apps/phpmyadmin/conf/phpmyadmin.conf重新启动apache:sudo /opt/bitnami/ctlscript.sh重新启动apache

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

此解决方案的问题是该目录中没有phpmyadmin.conf文件.我发现这与 Phpmyadmin.conf ,但这不允许我访问.

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.

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

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

我仍然遇到相同的For security reasons, this URL is only accesible using localhost (127.0.0.1) as the hostname错误,这使我发疯.

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.

/opt/bitnami/apps/phpmyadmin/conf/httpd-app.conf文件更改为以下文件后,便可以通过[PUBLIC_DNS/YOUR_DOMAIN_NAME/IP]/phpmyadmin]进行访问.

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].

主要更改为:

Allow from all

Require all granted

更改后,记住要重新启动apache服务器. (或重新启动您的实例)

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

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

sudo /opt/bitnami/ctlscript.sh restart apache

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

/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>

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

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

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