- Run the command below to add user to ".htpasswd" file
# htpasswd [DIRECTORY]/.htpasswd [USERNAME]
[DIRECTORY] represent the folder that store the password
[USERNAME] represent the user login id
Note: Password/Retype password will be prompted after the command above has been executed
- Open configuration file httpd.conf , add the configuration as described below
<Directory "/var/www/phpPgAdmin"> AuthName "Secure Area" AuthType Basic AuthUserFile [DIRECTORY]/.htpasswd require valid-user Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory>
Restart Apache server, voila, your phpPgAdmin is protected now.