18830: fix nginx parameters for single-host/single-hostname provisioning
[arvados.git] / tools / salt-install / config_examples / single_host / single_hostname / pillars / nginx_workbench2_configuration.sls
index 8e4b9b4aa1d99b4e53dac95580e85f1dc79f2f2a..d28fe80278d0629588b5ac2d8f33b39665447936 100644 (file)
@@ -1,18 +1,38 @@
 ---
 # Copyright (C) The Arvados Authors. All rights reserved.
 #
-# SPDX-License-Identifier: AGPL-3.0
+# SPDX-License-Identifier: Apache-2.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:
   ### SITES
   servers:
     managed:
+      ### DEFAULT
+      arvados_workbench2_default.conf:
+        enabled: true
+        overwrite: true
+        config:
+          - server:
+            - server_name: workbench2.__CLUSTER__.__DOMAIN__
+            - listen:
+              - 80
+            - location /.well-known:
+              - root: /var/www
+            - location /:
+              - return: '301 https://$host$request_uri'
+
       arvados_workbench2_ssl.conf:
         enabled: true
         overwrite: true