Remote Con to PostgreSQL

I have been trying to connect for 3 days now :frowning_face: 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 :grinning: !
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 …
IncludeOptional /etc/apache2/conf.d/*.inc
Then Restarted Apache in the Control Panel.
phppgadmin/ Now works :grinning: , so does Remote PostgreSQL Connections :grinning: :nerd_face:

I have been doing this because I use PHPStorm
I hope this Helps :grinning: :nerd_face:

You probally need to open port in the firewall to allow remote connections

I did open a Port 5432 , TCP . But that did Not work :thinking: That is why I did all that.

OK. My mistake , Full Apologies. I had a TCP 5432 Port Open , that I had forgotten about . Sorry.