I am using postgresql9.5 on a ubuntu 16.04 server VM. My institute network has blocked the port 5432 and hence I need to use 443 instead. But when I change my postgresql.conf to use this port, the server does not start at all. What should I do to solve or diagnose?
sudo netstat -nlp
will show you which process already listens on 443./var/log/postgresql/postgresql-9.5-main.log
should give more information on errors when starting. And ifpostgresql
is not running with system privileges, you can only use ports > 1023 (if the default is not changed) - see stackoverflow.com/questions/10182798/….postgresql
will not start when run from a privileged account (likeroot
); usingsudo
to start the service does not change the behaviour, as the owner running the daemon will be switched topostgres
(or whatever user is defined). If you really need to access your database via port 80 or 443, you might useauthbind
or port redirection via iptables, see Running network services as a non-root user.