SSL and port number [was: Rewrite -- failure]

J.R. themadbeaker at gmail.com
Wed Apr 29 11:56:11 UTC 2020


To redirect a browser from http to https, you don't need to do an 'if'
or 'rewrite'... The following would be the most efficient (and
simplest)...

server {
    listen       80;
    server_name  myapps.example.com;
    access_log   off;

    return 301 https://$host$request_uri;
}


More information about the nginx mailing list