Secure phpMyAdmin

If you would like, add an additional layer of security by enabling Apache’s authentication when accessing phpMyAdmin. Follow these steps:

  • Edit the /opt/bitnami/apps/phpmyadmin/conf/httpd-app.conf file and add the following lines outside the Directory directive.

    <Location /phpmyadmin>
       AuthType Basic
       AuthName phpMyAdmin
       AuthUserFile "/opt/bitnami/apache2/users"
       Require valid-user
  • Change or set the phpMyAdmin access password using the following command and replacing PASSWORD with the new password:

    $ sudo /opt/bitnami/apache2/bin/htpasswd -cb /opt/bitnami/apache2/users administrator PASSWORD
  • Restart Apache to have the changes take effect:

    $ sudo /opt/bitnami/ restart apache

Now, when accessing phpMyAdmin, users will be prompted to log in twice: first, with the username administrator and second, with the username root. The password for the first is the one set in the second step above. The password for the second can be obtained from the server launchpad or control panel.

Last modification September 5, 2018