]> Frank Brehm's Git Trees - pixelpark/hiera.git/commitdiff
MHK - Stage htaccess für externe IPs
authorOliver Böttcher <oliver.boettcher@pixelpark.com>
Wed, 29 Nov 2017 10:48:31 +0000 (11:48 +0100)
committerOliver Böttcher <oliver.boettcher@pixelpark.com>
Wed, 29 Nov 2017 10:48:31 +0000 (11:48 +0100)
customer/mhk/stage-www01-mhk-kueche-de.pixelpark.net.yaml
customer/mhk/stage-www02-mhk-kueche-de.pixelpark.net.yaml
customer/mhk/stage-www03-mhk-kueche-de.pixelpark.net.yaml

index 0165d45ad8922ebcf1b2fca244305eaeb2021a37..598c9b4f77a0633d376839d56adc28f42b965b64 100644 (file)
@@ -4,10 +4,19 @@ infra::additional_classes:
   - infra::profile::apache
   - apache::mod::proxy_ajp
   - apache::mod::headers
+  - apache::mod::remoteip
   - apache::mod::ssl
 
 apache::mpm_module: event
 
+infra::profile::apache::htdigest:
+  staging:
+    staging: ENC[PKCS7,MIIBiQYJKoZIhvcNAQcDoIIBejCCAXYCAQAxggEhMIIBHQIBADAFMAACAQEwDQYJKoZIhvcNAQEBBQAEggEAP7oxv6gMy/0tUEcd/ACYFYY/oB953bnXOnzmbB2knYEiZGmTi6fxOOcaMUiMJqNi1Y8qZNHlVBJPu8y0nHMYJzmlRZ+7MtnZcKcltlFu8xMQuLavTp71IELBns9EHsnTVBC1vZGSgGSR2JyxjT5jj5vrKDcy+CcRPrMwNL0fFXNsrCbGXSqFnsCZmUCABKpGFaJSRxW03es0N9FzwIqY++OJoVoSz6UmR5sEsgIvx06Yes1uSacalWv8Jy4rVRDhegI9V/l2MSNfQUm3taw5fIXIQInLJmB3/Mzbwedn5yPXjnzW/I/V55JHdaKzp/ObGbCvFgTH5TVYGiLOMbVQWDBMBgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBCA6AhRRo88L1UUUirLWzF5gCCaC0u3kk+Ei9GDRha9TMX0iJTTN9Bl8SiSPpDWfHEd9g==]
+
+apache::mod::remoteip::proxy_ips:
+  - '77.74.235.188'
+  - '77.74.235.189'
+
 infra::profile::apache::pp_vhosts:
   www:
     docroot: '/var/www/mhk'
@@ -17,6 +26,21 @@ infra::profile::apache::pp_vhosts:
       - stage-www-kueche-de.pixelpark.net
       - stage-www01-mhk-kueche-de.pixelpark.net
     ssl: false
+    directories:
+      - location1:
+        provider: location
+        path: '/'
+        auth_type: Digest
+        auth_name: staging
+        auth_digest_provider: file
+        auth_digest_algorithm: MD5
+        auth_user_file: '/etc/httpd/htdigest'
+        auth_require: 'valid-user'
+        require:
+          - local
+          - 'ip 195.185.213.186/32'
+          - 'ip 217.66.51.0/24'
+          - 'ip 83.125.19.254/32'
     rewrites:
       - to_ssl:
         comment: 'all to https'
@@ -104,7 +128,7 @@ infra::profile::apache::pp_vhosts:
             url: '/'
     setenvif:
       - 'HTTPS on HTTPS=on'
-    access_log_format: lb_combined
+    access_log_format: remote_combined
     error_documents:
       - { error_code: 500 , document: "/errors/500.html" }
       - { error_code: 501 , document: "/errors/500.html" }
index d285371a74d25171d645673120194977b94fe475..3a54286dcb5367edde423ececf2b8437a196e96b 100644 (file)
@@ -4,10 +4,19 @@ infra::additional_classes:
   - infra::profile::apache
   - apache::mod::proxy_ajp
   - apache::mod::headers
+  - apache::mod::remoteip
   - apache::mod::ssl
 
 apache::mpm_module: event
 
+infra::profile::apache::htdigest:
+  staging:
+    staging: ENC[PKCS7,MIIBiQYJKoZIhvcNAQcDoIIBejCCAXYCAQAxggEhMIIBHQIBADAFMAACAQEwDQYJKoZIhvcNAQEBBQAEggEAP7oxv6gMy/0tUEcd/ACYFYY/oB953bnXOnzmbB2knYEiZGmTi6fxOOcaMUiMJqNi1Y8qZNHlVBJPu8y0nHMYJzmlRZ+7MtnZcKcltlFu8xMQuLavTp71IELBns9EHsnTVBC1vZGSgGSR2JyxjT5jj5vrKDcy+CcRPrMwNL0fFXNsrCbGXSqFnsCZmUCABKpGFaJSRxW03es0N9FzwIqY++OJoVoSz6UmR5sEsgIvx06Yes1uSacalWv8Jy4rVRDhegI9V/l2MSNfQUm3taw5fIXIQInLJmB3/Mzbwedn5yPXjnzW/I/V55JHdaKzp/ObGbCvFgTH5TVYGiLOMbVQWDBMBgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBCA6AhRRo88L1UUUirLWzF5gCCaC0u3kk+Ei9GDRha9TMX0iJTTN9Bl8SiSPpDWfHEd9g==]
+
+apache::mod::remoteip::proxy_ips:
+  - '77.74.235.188'
+  - '77.74.235.189'
+
 infra::profile::apache::pp_vhosts:
   www:
     docroot: '/var/www/mhk'
@@ -17,6 +26,21 @@ infra::profile::apache::pp_vhosts:
       - stage-www-kueche-de.pixelpark.net
       - stage-www02-mhk-kueche-de.pixelpark.net
     ssl: false
+    directories:
+      - location1:
+        provider: location
+        path: '/'
+        auth_type: Digest
+        auth_name: staging
+        auth_digest_provider: file
+        auth_digest_algorithm: MD5
+        auth_user_file: '/etc/httpd/htdigest'
+        auth_require: 'valid-user'
+        require:
+          - local
+          - 'ip 195.185.213.186/32'
+          - 'ip 217.66.51.0/24'
+          - 'ip 83.125.19.254/32'
     rewrites:
       - to_ssl:
         comment: 'all to https'
@@ -104,7 +128,7 @@ infra::profile::apache::pp_vhosts:
             url: '/'
     setenvif:
       - 'HTTPS on HTTPS=on'
-    access_log_format: lb_combined
+    access_log_format: remote_combined
     error_documents:
       - { error_code: 500 , document: "/errors/500.html" }
       - { error_code: 501 , document: "/errors/500.html" }
index ad997122fae415212ac3a3c3bae7695e6597125b..c1c87fbd95b7b5601821fdbeebe4105242b3f820 100644 (file)
@@ -4,10 +4,19 @@ infra::additional_classes:
   - infra::profile::apache
   - apache::mod::proxy_ajp
   - apache::mod::headers
+  - apache::mod::remoteip
   - apache::mod::ssl
 
 apache::mpm_module: event
 
+infra::profile::apache::htdigest:
+  staging:
+    staging: ENC[PKCS7,MIIBiQYJKoZIhvcNAQcDoIIBejCCAXYCAQAxggEhMIIBHQIBADAFMAACAQEwDQYJKoZIhvcNAQEBBQAEggEAP7oxv6gMy/0tUEcd/ACYFYY/oB953bnXOnzmbB2knYEiZGmTi6fxOOcaMUiMJqNi1Y8qZNHlVBJPu8y0nHMYJzmlRZ+7MtnZcKcltlFu8xMQuLavTp71IELBns9EHsnTVBC1vZGSgGSR2JyxjT5jj5vrKDcy+CcRPrMwNL0fFXNsrCbGXSqFnsCZmUCABKpGFaJSRxW03es0N9FzwIqY++OJoVoSz6UmR5sEsgIvx06Yes1uSacalWv8Jy4rVRDhegI9V/l2MSNfQUm3taw5fIXIQInLJmB3/Mzbwedn5yPXjnzW/I/V55JHdaKzp/ObGbCvFgTH5TVYGiLOMbVQWDBMBgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBCA6AhRRo88L1UUUirLWzF5gCCaC0u3kk+Ei9GDRha9TMX0iJTTN9Bl8SiSPpDWfHEd9g==]
+
+apache::mod::remoteip::proxy_ips:
+  - '77.74.235.188'
+  - '77.74.235.189'
+
 infra::profile::apache::pp_vhosts:
   www:
     docroot: '/var/www/mhk'
@@ -17,6 +26,21 @@ infra::profile::apache::pp_vhosts:
       - stage-www-kueche-de.pixelpark.net
       - stage-www03-mhk-kueche-de.pixelpark.net
     ssl: false
+    directories:
+      - location1:
+        provider: location
+        path: '/'
+        auth_type: Digest
+        auth_name: staging
+        auth_digest_provider: file
+        auth_digest_algorithm: MD5
+        auth_user_file: '/etc/httpd/htdigest'
+        auth_require: 'valid-user'
+        require:
+          - local
+          - 'ip 195.185.213.186/32'
+          - 'ip 217.66.51.0/24'
+          - 'ip 83.125.19.254/32'
     rewrites:
       - to_ssl:
         comment: 'all to https'
@@ -104,7 +128,7 @@ infra::profile::apache::pp_vhosts:
             url: '/'
     setenvif:
       - 'HTTPS on HTTPS=on'
-    access_log_format: lb_combined
+    access_log_format: remote_combined
     error_documents:
       - { error_code: 500 , document: "/errors/500.html" }
       - { error_code: 501 , document: "/errors/500.html" }