【发布时间】:2014-03-02 19:34:36
【问题描述】:
我有 2 个 MySQL 用户,一个普通的“tommy”和一个控制用户“tommy_ctl”
Apache httpd 2.4.7 在 9090 for http 和 9080 for https 上运行
phpMyAdmin (v4.1.6) config.inc.php 文件包含“tommy_ctl”的用户/密码
我以“tommy”身份登录 phpMyAdmin 主页
现在
a) 在 config.inc.php
与
$cfg['Servers'][$i]['ssl'] = false;
$cfg['ForceSSL'] = false;
我可以登录
http://linuxboxA:9090/phpMyAdmin/index.php
https://linuxboxA:9080/phpMyAdmin/index.php
b) 当我设置时
$cfg['Servers'][$i]['ssl'] = true;
为什么
https://linuxboxA:9080/phpMyAdmin/index.php
登录时出现错误?:
#1043 Cannot log in to the MySQL server
Connection for controluser as defined in your configuration failed
此 SSL 选项是否不适用于通过 Apache 进行通信?
c) 当我设置时
$cfg['Servers'][$i]['ssl'] = true;
$cfg['ForceSSL'] = true;
https 9080 url 需要很多秒才能打开
https://lnappd201.hphc.org:9080/phpMyAdmin/index.php
然后登录就变成了
https://lnappd201.hphc.org/phpMyAdmin/index.php?token=23771cb3b3851979903c6eb233465fd8
注意,重定向的 url 中没有端口号
还有,
http://lnappd201.hphc.org:9090/phpMyAdmin/index.php
立即变为(无需任何登录)
https://lnappd201.hphc.org/phpMyAdmin/?SID
当设置“ForceSSL”时,phpMyAdmin 显然不知道 apache SSL 在端口 9080,
那么 ForceSSL 选项是如何工作的呢?
我的意图是,即使 Apache 在两个端口上都运行,我希望 phpMyAdmin 使用 SSL 和 ForceSSL(到 Apache SSL)
【问题讨论】:
标签: apache ssl phpmyadmin