postgresqlssldatadirectory

Postgresql and SSL certificat


I'm trying to install PostgreSQL with another data directory.

The problem comes when I try to start postgresql I have the following error :

Starting PostgreSQL 9.1 database server: main[....] The PostgreSQL server failed to start. Please check the log output: 2014-04-16 22:14:51 CEST FATAL: could not load server [FAILficate file "server.crt": No such file or directory ... failed!
 failed!

I've tried a lot of things coming from here or here but nothing works for me.

My configuration file is in /etc/postgresql/9.1/main/ but I don't know why I have a some other configuration files on my new data directory. (visibly they are not used).

Naturally I can fix this bug by commenting the ssl = true on the postgresql.conf but it's not at all the aim.


Solution

  • According to the PostgreSQL Reference you should check your $PGDATA directory for the server.crt file. In cases is missing you should either request a new certificate or make self signed one and place the file there.