Problems with redirects

Danny Horne danny at trisect.uk
Tue Oct 15 12:40:51 UTC 2019


Hi all,

I've been struggling to get redirects working the way I'd like, 
basically I want -

http://trisect.uk > https://trisect.uk
http://site1.trisect.uk > https://site1.trisect.uk
http://site2.trisect.uk > https://site2.trisect.uk
etc....

This is the server block doing the redirects -

server {
         listen *:80;
         listen [::]:80;

         server_name trisect.uk *.trisect.uk;

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

I have a wildcard Let's Encrypt certificate and am using NginX 1.14.2

Hope someone can help, thanks for looking



More information about the nginx mailing list