- Plesk for Linux
Attempts to access PostgreSQL database hosted on the Plesk server using network connection to
localhost:5432fail with the following error:
psql: FATAL: Ident authentication failed for user "jdoe"
Websites using Ruby applications which access PostgreSQL database show the following error:
500 Internal Server Error
If you are the administrator of this website, then please read this web application's log file and/or the web server's log file to find out what went wrong.
PostgreSQL is configured to use ident authentication for network connections.
Connect to the server via SSH
Change authentication configuration of host type from ident to md5 in
pg_hba.conffile. By default it is located for example at the following paths:
/var/lib/pgsql/data/pg_hba.confon RedHat-based systems
/var/lib/postgresql/9.1/main/pg_hba.confon Debian-based systems
Update the following lines:
host all all 127.0.0.1/32 ident
host all all ::1/128 ident
host all all 203.0.113.2/32 ident
To the following:
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
host all all 203.0.113.2/32 md5
Restart PostgreSQL service to apply changes:
# service postgresql restart