【问题标题】:phpMyAdmin Auth Method and Force SSL Not Working as expectedphpMyAdmin Auth 方法和强制 SSL 未按预期工作
【发布时间】:2013-03-30 06:24:51
【问题描述】:

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

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

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

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

如果有帮助,下面是我的 clean 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;
?>

【问题讨论】:

    标签: php mysql apache phpmyadmin


    【解决方案1】:

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

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

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-22
      • 2015-01-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多