]> Frank Brehm's Git Trees - pixelpark/hiera.git/commitdiff
ODT - opencms rewrites
authorOliver Böttcher <oliver.boettcher@pixelpark.com>
Thu, 6 Apr 2017 10:27:47 +0000 (12:27 +0200)
committerOliver Böttcher <oliver.boettcher@pixelpark.com>
Thu, 6 Apr 2017 10:27:47 +0000 (12:27 +0200)
customer/mbvd-odt/cms-odt-daimler-com.pixelpark.net.yaml

index d0421ba15913c9a545cf70a9352799f84e819ae8..cd2ac6b5333fe102de6d697d8bc52b52973a8bc5 100644 (file)
@@ -34,10 +34,10 @@ infra::profile::apache::pp_vhosts:
       - cms-odt-daimler-com.pixelpark.net
     ssl: false
     rewrites:
-#      - opencms_to_slash:
-#        comment: '/opencms# to /'
-#        rewrite_rule:
-#          - '^/opencms/(.*)$ /$1 [R,L]'
+      - opencms_to_slash:
+        comment: '/opencms to /'
+        rewrite_rule:
+          - '^/opencms(/)?$ / [R,L]'
       - https:
         comment: 'all to https'
         rewrite_cond:
@@ -75,6 +75,16 @@ infra::profile::apache::pp_vhosts:
           - '%%{ich-trickse}{REQUEST_URI} !^/(opencms|resources|export|skins|genImages|genImagesTemp|fonts)'
         rewrite_rule:
           - '^(.*)$ http://localhost:8081/opencms$1 [P,L]'
+      - proxy_non_https_fix:
+        rewrite_cond:
+          - '%%{ich-trickse}{HTTP:HTTPS} !=on [NC]'
+        rewrite_rule:
+          - '^/opencms/(.*)$ http://localhost:8080/opencms/$1 [P,L]'
+      - proxy_https_fix:
+        rewrite_cond:
+          - '%%{ich-trickse}{HTTP:HTTPS} =on [NC]'
+        rewrite_rule:
+          - '^/opencms/(.*)$ http://localhost:8081/opencms/$1 [P,L]'
     proxy_preserve_host: true
     directories:
       - access-control-fonts: