googleruby

Secure phpPgAdmin

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

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

    <Location /phppgadmin>
       AuthType Basic
       AuthName phpPgAdmin
       AuthUserFile "/opt/bitnami/apache2/users"
       Require valid-user
    </Location>
    
  • Change or set the phpPgAdmin 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/ctlscript.sh restart apache
    

Now, when accessing phpPgAdmin, users will be prompted to log in twice: first, with the username administrator and second, with the username postgres. 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.