using Nnginx Server blocks to listen to peer Ports?

I was wondering if I could try creating NGINX server blocks to allow listening into the peer ports and server API port, and if this would allow secure access, when using nginx server block? I have already got https using certbot and was having trouble following your suggestions Sergei, however I will try and do so on a different droplet, anew. I'm just wondering if the following might be sufficient in regards introducing SSL to the API and peer ports to prevent vulnerabilities or making these ports accessible. I should have paid more attention when using certbot, prior to having to deal with these ports on a hired droplet, not my home pc....

server {server {
    listen       7876;
    server_name   www.example.org:7876;   
    root         /var/www/:7876/index.html
}

server {
    listen       81;
    server_name  example.org  www.example.org:80  or just www.example.org ?;
    root         /var/www/port81/
}

I will however follow the way stipulated according to your linked documents, thank you sergei. I am just curious if server blocks via Nginx wouldn't do the trick along with certbot. I'd rather RTFM (read the F manual) :stuck_out_tongue:

Hi Williamxvii.
Can you tell me step by step how you set up ssl in your project? can you also share the content of nxt.properties?
my server ubuntu 18.04 jetty9 is not running. Could it be that jetty9 is not working because I can't install ssl?
Thanks in advance.

hi I opted out of nginx but I will have to read up on nginx. Someone gave me a solution for apache but I'd like to use nginx for scalability purposes. I ... I'm learning as I go, sadly.
I'm too ill currently to be technically capable of anything.

no it is not due to SSL. Because remember you can run web servers without SSL, the server is not dependent on SSL at all. This reminds me of the queen song "which way the wind blows" - doesn't realy maaaa tter, to me... Mommma, I was just a ... bla bla bla but of course Freddy Mercury is not a server and of course it is very important to know which way the wind blows when it comes to servers...

Not at all its not working because there is no SSL I think you should read up on certbot to get SSL which is auto-updated.

I am just guessing that there are some dependencies that is causing your jetty9 to be "not running" although I do not know what you mean by this, is there some error log or screenshot? Why are you using jetty9? I'm not familiar with it at all in any direct sense, something I know is running in the background ... I'm not even sure if jetty9 is an actual webserver or if it is a dependency on which apache web server relies upon. I really don't know. I sadly do not have an education in computer science and regret it quite a lot, I'm just a front-end guy who a little server side experience, nothing deeply theoretical or such...

lol I had NO clue when I wrote this. I've learned quite a lot since then :slight_smile: wow

1 Like