---
-{% set nginx_log = '/var/log/nginx' %}
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# 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:
servers:
managed:
### DEFAULT
- arvados_workbench2_default:
+ arvados_workbench2_default.conf:
enabled: true
overwrite: true
config:
- server:
- - server_name: workbench2.example.net
+ - server_name: workbench2.fixme.example.net
- listen:
- 80
- location /.well-known:
- location /:
- return: '301 https://$host$request_uri'
- arvados_workbench2:
+ arvados_workbench2_ssl.conf:
enabled: true
overwrite: true
+ requires:
+ file: nginx_snippet_arvados-snakeoil.conf
config:
- server:
- - server_name: workbench2.example.net
+ - server_name: workbench2.fixme.example.net
- listen:
- 443 http2 ssl
- index: index.html index.htm
- try_files: '$uri $uri/ /index.html'
- 'if (-f $document_root/maintenance.html)':
- return: 503
- # - include: 'snippets/letsencrypt.conf'
- - include: 'snippets/snakeoil.conf'
- - access_log: {{ nginx_log }}/workbench2.example.net.access.log combined
- - error_log: {{ nginx_log }}/workbench2.example.net.error.log
+ - location /config.json:
+ - return: {{ "200 '" ~ '{"API_HOST":"fixme.example.net"}' ~ "'" }}
+ - include: 'snippets/ssl_hardening_default.conf'
+ - include: 'snippets/arvados-snakeoil.conf'
+ - access_log: /var/log/nginx/workbench2.fixme.example.net.access.log combined
+ - error_log: /var/log/nginx/workbench2.fixme.example.net.error.log