Hi @communityservice,
We reached too many replies, so I started a new answer.
@communityservice wrote
sudo netstat -tulpn | grep -e 6000 -e 6001
resulted in below
tcp 0 0 1.2.3.4:6000 0.0.0.0:* LISTEN 24317/./appname
It looks like before. First of all, you need to change the settings in your app configuration to make it listening on localhost (127.0.0.1), not on public IP address (1.2.3.4 in the example). Otherwise, the configuration I sent you will not work, you will have two services listening on your public IP port 6000, the app and nginx.
@communityservice wrote
anything that I did wrong?
Or was I supposed to add it to some other file? Or maybe creating sym link?
You can add new server blocks to your existing file as well as to a new file. In the first case you do not have to care about creating a symlink.
@communityservice wrote
nginx: [warn] the “ssl” directive is deprecated, use the “listen … ssl” directive instead in /etc/nginx/sites-enabled/domain.com:48
It is just a warning but it would be good to fix it too. What is your directive in line 48 of the file /etc/nginx/sites-enabled/domain.com ?
And remember to restart nginx service after changing its configuration. First check if the syntax of config files is OK, of course :)
sudo nginx -t
sudo systemctl restart nginx
Hi All
Few call outs: The droplet has only Ubuntu 20.04 and Postgres 12 installed along with an app. It does not have apache or nginx (I have checked using nginx -v and apache2 -v). The idea is to only encrypt the traffic between the app and the pg database.