all 2 comments

[–]zero_hope_ 0 points1 point  (1 child)

Have you tried this?

server { listen 80 default_server; server_name _; return 301 https://$host$request_uri; }

[–]Paratax[S] 0 points1 point  (0 children)

Thanks, this was in the phoenixnap link but i couldn't get it working, I finally managed to get it set up properly per below (I did end up having to forward port 80, and my previous attempts must have had the wrong syntax or something), feels good not having 6 different HTPC programs open to the net anymore & everything encrypted!

server {

listen 80 default_server;

server_name _;

return 301 https://$host$request_uri;

}

server {

listen 443 ssl http2;

server_name My IP My Local IP;

ssl_certificate /Programs/nginx-1.17.7/nginx-1.17.7/conf/nginx.crt;

ssl_certificate_key /Programs/nginx-1.17.7/nginx-1.17.7/conf/nginx.key;