Merge branch '20690-remove-wb1-from-installer'. Closes #20690
[arvados.git] / tools / salt-install / config_examples / multi_host / aws / pillars / nginx_download_configuration.sls
index 9246fc11cbeece3d4d051a20217b29dc8d8bc22d..4470a388a951ce09730f3573762b70dc3e6e7625 100644 (file)
@@ -3,6 +3,8 @@
 #
 # SPDX-License-Identifier: AGPL-3.0
 
+{%- import_yaml "ssl_key_encrypted.sls" as ssl_key_encrypted_pillar %}
+
 ### NGINX
 nginx:
   servers:
@@ -13,7 +15,7 @@ nginx:
         overwrite: true
         config:
           - server:
-            - server_name: download.__CLUSTER__.__DOMAIN__
+            - server_name: download.__DOMAIN__
             - listen:
               - 80
             - location /:
@@ -27,7 +29,7 @@ nginx:
           __CERT_REQUIRES__
         config:
           - server:
-            - server_name: download.__CLUSTER__.__DOMAIN__
+            - server_name: download.__DOMAIN__
             - listen:
               - __KEEPWEB_EXT_SSL_PORT__ http2 ssl
             - index: index.html index.htm
@@ -47,5 +49,8 @@ nginx:
             - include: snippets/ssl_hardening_default.conf
             - ssl_certificate: __CERT_PEM__
             - ssl_certificate_key: __CERT_KEY__
-            - access_log: /var/log/nginx/download.__CLUSTER__.__DOMAIN__.access.log combined
-            - error_log: /var/log/nginx/download.__CLUSTER__.__DOMAIN__.error.log
+            {%- if ssl_key_encrypted_pillar.ssl_key_encrypted.enabled %}
+            - ssl_password_file: {{ '/run/arvados/' | path_join(ssl_key_encrypted_pillar.ssl_key_encrypted.privkey_password_filename) }}
+            {%- endif %}
+            - access_log: /var/log/nginx/download.__DOMAIN__.access.log combined
+            - error_log: /var/log/nginx/download.__DOMAIN__.error.log