18791: allow single-host-single-hostname to manage LE certs
[arvados.git] / tools / salt-install / config_examples / single_host / single_hostname / pillars / nginx_keepproxy_configuration.sls
index 5a4f2492107aeb3a578fbfada9df626c6f46649d..11f6e85695bf664ff120af37b705d37a449fcd64 100644 (file)
@@ -15,9 +15,23 @@ nginx:
 
   servers:
     managed:
-      arvados_keepproxy_ssl:
+      ### DEFAULT
+      arvados_keepproxy_default.conf:
         enabled: true
         overwrite: true
+        config:
+          - server:
+            - server_name: keep.__CLUSTER__.__DOMAIN__
+            - listen:
+              - 80
+            - location /:
+              - return: '301 https://$host$request_uri'
+
+      arvados_keepproxy_ssl.conf:
+        enabled: true
+        overwrite: true
+        requires:
+          __CERT_REQUIRES__
         config:
           - server:
             - server_name: __HOSTNAME_EXT__
@@ -38,6 +52,8 @@ nginx:
             - client_max_body_size: 64M
             - proxy_http_version: '1.1'
             - proxy_request_buffering: 'off'
-            - include: 'snippets/arvados-snakeoil.conf'
+            - include: snippets/ssl_hardening_default.conf
+            - ssl_certificate: __CERT_PEM__
+            - ssl_certificate_key: __CERT_KEY__
             - access_log: /var/log/nginx/keepproxy.__CLUSTER__.__DOMAIN__.access.log combined
             - error_log: /var/log/nginx/keepproxy.__CLUSTER__.__DOMAIN__.error.log