docs(single_host): fix hostnames and tests
[arvados-formula.git] / test / salt / pillar / examples / nginx_workbench_configuration.sls
index a641bba94d3f05a307364524bfdf98dbf99692e4..fbadc58259f2ec8ca810a0b7673b122329aad491 100644 (file)
@@ -1,8 +1,14 @@
 ---
+{%- 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:
@@ -13,13 +19,13 @@ nginx:
       ### STREAMS
       http:
         upstream workbench_upstream:
-          - server: '127.0.0.2:9000 fail_timeout=10s'
+          - server: 'workbench.internal:9000 fail_timeout=10s'
 
   ### SITES
   servers:
     managed:
       ### DEFAULT
-      arvados_workbench_default:
+      arvados_workbench_default.conf:
         enabled: true
         overwrite: true
         config:
@@ -32,7 +38,7 @@ nginx:
             - location /:
               - return: '301 https://$host$request_uri'
 
-      arvados_workbench:
+      arvados_workbench_ssl.conf:
         enabled: true
         overwrite: true
         config:
@@ -50,17 +56,18 @@ nginx:
               - proxy_set_header: 'Host $http_host'
               - proxy_set_header: 'X-Real-IP $remote_addr'
               - proxy_set_header: 'X-Forwarded-For $proxy_add_x_forwarded_for'
+            - include: 'snippets/ssl_hardening_default.conf'
             # - include: 'snippets/letsencrypt.conf'
-            - include: 'snippets/snakeoil.conf'
+            - include: 'snippets/ssl_snakeoil.conf'
             - access_log: /var/log/nginx/workbench.fixme.example.net.access.log combined
             - error_log: /var/log/nginx/workbench.fixme.example.net.error.log
 
-      arvados_workbench_upstream:
+      arvados_workbench_upstream.conf:
         enabled: true
         overwrite: true
         config:
           - server:
-            - listen: '127.0.0.2:9000'
+            - listen: 'workbench.internal:9000'
             - server_name: workbench
             - root: /var/www/arvados-workbench/current/public
             - index:  index.html index.htm