I have been trying to connect for 3 days now to my local Ubuntu 22.04.3 LTS server. From my test .php file. Just now I have found out how to make this work !
By editing , vim /etc/postgresql/$Version/main/postgresql.conf ! at #Listen Address = " " , I Changed it to , Listen Address = “0.0.0.0” , so that it lets All IPv4 Addresses in, which is NOT good for Public ! but OK for your local network (if it is Safe) !I have also Added a Superuser to PostgreSQL on the Command Line , like so …
sudo -u postgres createuser --superuser New User -P
Then in HestiaCp I restarted PostgreSQL . Now I added to apache2.conf in /etc/apache2/ , this line …
Then Restarted Apache in the Control Panel.
phppgadmin/ Now works , so does Remote PostgreSQL Connections
I have been doing this because I use PHPStorm
I hope this Helps