18830: fix nginx parameters for single-host/single-hostname provisioning
[arvados.git] / tools / salt-install / config_examples / single_host / single_hostname / pillars / nginx_workbench_configuration.sls
index 3477c02750c98860ab555bb619b96cf1d9a450ff..59fb43e57af40d70736dc27822c304bdce76f1c6 100644 (file)
@@ -3,10 +3,16 @@
 #
 # SPDX-License-Identifier: AGPL-3.0
 
+{%- if grains.os_family in ('RedHat',) %}
+  {%- set group = 'nginx' %}
+{%- else %}
+  {%- set group = 'www-data' %}
+{%- endif %}
+
 ### ARVADOS
 arvados:
   config:
-    group: www-data
+    group: {{ group }}
 
 ### NGINX
 nginx:
@@ -22,6 +28,20 @@ nginx:
   ### SITES
   servers:
     managed:
+      ### DEFAULT
+      arvados_workbench_default.conf:
+        enabled: true
+        overwrite: true
+        config:
+          - server:
+            - server_name: workbench.__CLUSTER__.__DOMAIN__
+            - listen:
+              - 80
+            - location /.well-known:
+              - root: /var/www
+            - location /:
+              - return: '301 https://$host$request_uri'
+
       arvados_workbench_ssl.conf:
         enabled: true
         overwrite: true