X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/65d25630f34296f30c50cd78f232713f23f70bc3..94bd8cbba915c9a55a7822dac66ca01d3b717f66:/tools/salt-install/config_examples/multi_host/aws/pillars/nginx_webshell_configuration.sls?ds=sidebyside diff --git a/tools/salt-install/config_examples/multi_host/aws/pillars/nginx_webshell_configuration.sls b/tools/salt-install/config_examples/multi_host/aws/pillars/nginx_webshell_configuration.sls index 49c86dd313..41471ab7a3 100644 --- a/tools/salt-install/config_examples/multi_host/aws/pillars/nginx_webshell_configuration.sls +++ b/tools/salt-install/config_examples/multi_host/aws/pillars/nginx_webshell_configuration.sls @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: AGPL-3.0 +{%- import_yaml "ssl_key_encrypted.sls" as ssl_key_encrypted_pillar %} + ### NGINX nginx: ### SERVER @@ -12,34 +14,34 @@ nginx: ### STREAMS http: upstream webshell_upstream: - - server: 'localhost:4200 fail_timeout=10s' + - server: 'shell.__DOMAIN__:4200 fail_timeout=10s' ### SITES servers: managed: - arvados_webshell_default: + arvados_webshell_default.conf: enabled: true overwrite: true config: - server: - - server_name: webshell.__CLUSTER__.__DOMAIN__ + - server_name: webshell.__DOMAIN__ - listen: - 80 - location /: - return: '301 https://$host$request_uri' - arvados_webshell_ssl: + arvados_webshell_ssl.conf: enabled: true overwrite: true requires: - cmd: create-initial-cert-webshell.__CLUSTER__.__DOMAIN__-webshell.__CLUSTER__.__DOMAIN__ + __CERT_REQUIRES__ config: - server: - - server_name: webshell.__CLUSTER__.__DOMAIN__ + - server_name: webshell.__DOMAIN__ - listen: - - __CONTROLLER_EXT_SSL_PORT__ http2 ssl + - __WEBSHELL_EXT_SSL_PORT__ http2 ssl - index: index.html index.htm - - location /shell.__CLUSTER__.__DOMAIN__: + - location /shell.__DOMAIN__: - proxy_pass: 'http://webshell_upstream' - proxy_read_timeout: 90 - proxy_connect_timeout: 90 @@ -69,7 +71,11 @@ nginx: - add_header: "'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'" - include: snippets/ssl_hardening_default.conf - - include: snippets/webshell.__CLUSTER__.__DOMAIN___letsencrypt_cert[.]conf - - access_log: /var/log/nginx/webshell.__CLUSTER__.__DOMAIN__.access.log combined - - error_log: /var/log/nginx/webshell.__CLUSTER__.__DOMAIN__.error.log + - ssl_certificate: __CERT_PEM__ + - ssl_certificate_key: __CERT_KEY__ + {%- 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/webshell.__DOMAIN__.access.log combined + - error_log: /var/log/nginx/webshell.__DOMAIN__.error.log