phpMyAdmin in ISPmanager on a VPS: HTTPS, address, errors

phpMyAdmin is installed in "Software configuration". In the panel it opens with the "Database web-interface" button in "Databases".

phpMyAdmin in "Software configuration"
phpMyAdmin in "Software configuration"

"phpMyAdmin address" is a random path that hides phpMyAdmin from scanners. We recommend enabling "Deny root user authorization in phpMyAdmin".

Port 1501

The panel opens phpMyAdmin and other external applications through port 1501 ("Web server settings" → "SSL for external applications"). If the "Database web-interface" button does not open phpMyAdmin, open port 1501 in the firewall: Firewall.

HTTPS only

To make phpMyAdmin always switch to HTTPS, add this line to its config:

# Ubuntu/Debian: /etc/phpmyadmin/config.inc.php
# AlmaLinux/CentOS: /etc/phpMyAdmin/config.inc.php
$cfg['ForceSSL'] = TRUE;

Your own panel link address

By default the link points to the user site address. To make the panel open phpMyAdmin or webmail at your address, add to /usr/local/mgr5/etc/ispmgr.conf:

path phpmyadmin-redirect https://pma.example.com/phpmyadmin/
path webmail-redirect https://mail.example.com/roundcube/

and restart the panel: /usr/local/mgr5/sbin/mgrctl -m ispmgr exit. Quick-jump buttons use lines like extaction phpmyadmin $manager?startform=phpmyadminredir&sok=ok.

Certificate error when opening phpMyAdmin

The browser says the certificate is issued to another name — phpmyadmin-redirect points to an address that has no site with a certificate on the server. The request reaches another site and gets its certificate. Check:

curl -ikLv https://pma.example.com 2>&1 | grep -i "subject\|not verified"

Fix: put a site that has its own certificate into phpmyadmin-redirect, or return the default value — then the site address and its certificate are used:

path phpmyadmin-redirect http://$site/phpmyadmin/
Questions and answers
Most likely port 1501 is closed — the panel opens external applications through it. Open it in the firewall.
Add $cfg['ForceSSL'] = TRUE; to the phpMyAdmin config.inc.php.
path phpmyadmin-redirect points to an address without its own certificate. Use a site that has a certificate or return http://$site/phpmyadmin/.