nginx/https-redirect: use return instead of rewrite regex, $host instead of $server_name
authorClemens Hopfer <spam-datacop@wireloss.net>
Sun, 5 Oct 2014 18:55:46 +0000 (20:55 +0200)
committerClemens Hopfer <spam-datacop@wireloss.net>
Sun, 5 Oct 2014 18:55:46 +0000 (20:55 +0200)
src/configuration/Webservers/nginx/default-hsts

index 0824740..a50136c 100644 (file)
@@ -26,7 +26,7 @@ server {
 
        # Make site accessible from http://localhost/
        server_name localhost;
-       rewrite        ^ https://$server_name$request_uri? permanent;
+       return 301 https://$host$request_uri;
 }