1

关于这个经过搜索的谷歌,我在这里经历了几个问答,但我不知所措。

我已经安装了 phpMyAdmin,我想强制 SSL 登录。我还想使用基于 cookie 的身份验证和 HTML 登录屏幕。据我所知,一切都设置正确。例如,我正在使用该$cfg['Servers'][$i]['auth_type'] = 'cookie';指令,并且我有一个配置为 42 个字符的河豚密码。但是,当我访问我的页面时,我会像基本身份验证一样弹出用户名和密码。

此外,我$cfg['ForceSSL'] = true;指定了指令。但是,当我访问该页面时,我没有被重定向到该https://页面的版本。

有任何想法吗?我已经AllowOverride All在我的 Apache httpd.config 中设置了。我还启用了重写和 SSL 模块。

如果有帮助,下面是我的干净文件。 conf.inc.php

<?php
/*
 * Generated configuration file
 * Generated by: phpMyAdmin 3.5.7 setup script
 * Date: Sat, 30 Mar 2013 04:36:10 +0000
 */

/* Servers configuration */
$i = 0;

/* Server: My Database [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = 'My Database';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['ssl'] = true;
$cfg['Servers'][$i]['connect_type'] = 'socket';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['compress'] = true;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['CountTables'] = true;
$cfg['Servers'][$i]['tracking_version_auto_create'] = true;

/* End of servers configuration */

$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
$cfg['blowfish_secret'] = 'mysuperawesomesecret';
$cfg['ForceSSL'] = true;
$cfg['UserprefsDeveloperTab'] = true;
$cfg['ShowPhpInfo'] = true;
$cfg['LeftDisplayServers'] = true;
$cfg['DisplayServersList'] = true;
$cfg['SQLValidator']['use'] = true;
$cfg['SQLQuery']['Validate'] = true;
$cfg['QueryHistoryDB'] = true;
$cfg['RetainQueryBox'] = true;
$cfg['DefaultLang'] = 'en';
$cfg['ServerDefault'] = 1;
?>
4

1 回答 1

3

好的。我想到了。正如我所怀疑的那样,这是愚蠢的。

我使用了 EPEL 的以下软件包:phpMyAdmin.noarch 3.5.7-1.el6 @epel.

事实证明,这个包将一个文件放在我不知道的位置,即/etc/phpMyAdmin/config.inc.php. 该文件覆盖了我在 phpMyAdmin 根文件夹中指定的每个指令。

我正在使用centOS 6.2. 希望这个答案可以帮助将来的人:-)

于 2013-03-30T20:45:40.710 回答