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

J.R. themadbeaker at
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

server {
    listen       80;
    access_log   off;

    return 301 https://$host$request_uri;

More information about the nginx mailing list