Page 1 of 1

phpmyadmin link opens http URL instead of HTTPS

Posted: Tue May 31, 2016 7:08 am
by petron
Hi,

If I open in DB > PHPMYADMIN link it will open phpmyadmin in HTTP mode but not HTTPS. Is it possible to fix this? Yes, I can use redirector or any other browser extension to redirect these links to the HTTPS version, but it would be easier to open it with one single click without any add-on or trick.

Thanks

Re: phpmyadmin link opens http URL instead of HTTPS

Posted: Wed Jun 15, 2016 1:55 pm
by skurudo
If you use ssl domain for access, there no such thing.
https://domain.com:8083 -> https://domain.com/phpmyadmin

In case with IP, you can enable https in phpmyadmin - http://docs.phpmyadmin.net/en/latest/config.html

Code: Select all

$cfg['Servers'][$i]['ssl']
Type: boolean
Default value: false

Whether to enable SSL for the connection between phpMyAdmin and the MySQL server to secure the connection.

Re: phpmyadmin link opens http URL instead of HTTPS

Posted: Fri May 29, 2020 10:15 am
by SdeSergi
skurudo wrote:
Wed Jun 15, 2016 1:55 pm
If you use ssl domain for access, there no such thing.
https://domain.com:8083 -> https://domain.com/phpmyadmin

In case with IP, you can enable https in phpmyadmin - http://docs.phpmyadmin.net/en/latest/config.html

Code: Select all

$cfg['Servers'][$i]['ssl']
Type: boolean
Default value: false

Whether to enable SSL for the connection between phpMyAdmin and the MySQL server to secure the connection.
Well, I don't think that's quite right.

In my case... (ubuntu 18.04.4) it's true that enabling the SSL of the domain is enough to do it also in phpmyadmin, but it doesn't redirect the http entries to https. No indication of this and other forums worked for me. The only way I could fix this was by adding the redirect lines inside /etc/phpmyadmin/apache.conf (inside the Directory tag).

Code: Select all

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
I'm a novice in manual server configuration. Is this a good practice? I just know that it works...