server { listen 80; listen [::]:80; server_name joshstock.in; # redirect non-https to https return 301 https://joshstock.in$request_uri; } server { listen 80; listen [::]:80; server_name git.joshstock.in; return 301 https://git.joshstock.in$request_uri; }