]> Frank Brehm's Git Trees - pixelpark/hiera.git/commitdiff
fbb-web - try HTTP-to-HTTPS-redirect in NGINX
authorThomas Dalichow <thomas.dalichow@publicispixelpark.de>
Wed, 20 Jun 2018 16:25:42 +0000 (18:25 +0200)
committerThomas Dalichow <thomas.dalichow@publicispixelpark.de>
Wed, 20 Jun 2018 16:25:56 +0000 (18:25 +0200)
customer/fbb-web/test.yaml

index cbd0f4927516d27de7adacbc29ad0e625ca823da..3f66240b4fe7f9f0e2f910440ebc269dab4d8c62 100644 (file)
@@ -158,6 +158,8 @@ infra::profile::nginx_php_fpm_server::vhosts:
         - '217.66.56.0/24'
         - '194.174.72.0/21'
       deny: 'all'
+    rewrite_rules:
+      - 'set $do_https_redirect = 0; if ($http_x_forwarded_proto != "https") { set $do_https_redirect = 1; } if ($host = "tst-roadmap.berlin-airport.de") { set $do_https_redirect "${do_https_redirect}1"; } if ($do_https_redirect = 11) { return 301 https://$host$request_uri permanent; }'
   tst-berhub-berlin-airport-de_ssl:
     ensure: present
     www_root: '/srv/www/tst-berhub-berlin-airport-de'