Force PHPMyAdmin to use HTTPS

You want to use PHPMyAdmin. You want to force HTTPS so you don’t send plain-text MySQL credentials over the wire/air. You start fiddling with mod_rewrite and troubleshooting your Apache’s myriad of virtual hosts and included config files. There’s a better way!

In /etc/phpMyAdmin/, add this to the bottom:

$cfg['ForceSSL'] = true;

I like mod_rewrite and all, but when you have overlapping virtual hosts, different web servers (nginx is hawt), etc, sometimes it is confusing to do such a “simple” thing like redirect requests for /phpmyadmin to HTTPS. This will work no matter what. 🙂

2 thoughts on “Force PHPMyAdmin to use HTTPS

Comments are closed.