From 887c43cfc9cb7814172f3a78974265f22d38b8a8 Mon Sep 17 00:00:00 2001 From: Christophe Siraut Date: Fri, 23 Mar 2018 18:19:06 +0100 Subject: [PATCH] debian: update nginx-example.conf to redirect non-ssl requests (#22779) --- debian/nginx-example.conf | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/debian/nginx-example.conf b/debian/nginx-example.conf index 9bb6e627..9acde280 100644 --- a/debian/nginx-example.conf +++ b/debian/nginx-example.conf @@ -38,21 +38,5 @@ server { access_log /var/log/nginx/combo.example.org-access.log combined; error_log /var/log/nginx/combo.example.org-error.log; - location ~ ^/static/(.+)$ { - root /; - try_files /var/lib/combo/tenants/$host/static/$1 - /var/lib/combo/collectstatic/$1 - =404; - } - - location ~ ^/media/(.+)$ { - alias /var/lib/combo/tenants/$host/media/$1; - } - - location / { - proxy_pass http://unix:/var/run/combo/combo.sock; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - } + return 302 https://$host$request_uri; }