17755: Merge branch 'main' into 17755-add-singularity-to-compute-image
[arvados.git] / tools / salt-install / config_examples / single_host / multiple_hostnames / pillars / nginx_workbench_configuration.sls
1 ---
2 # Copyright (C) The Arvados Authors. All rights reserved.
3 #
4 # SPDX-License-Identifier: AGPL-3.0
5
6 ### ARVADOS
7 arvados:
8   config:
9     group: www-data
10
11 ### NGINX
12 nginx:
13   ### SERVER
14   server:
15     config:
16
17       ### STREAMS
18       http:
19         upstream workbench_upstream:
20           - server: 'workbench.internal:9000 fail_timeout=10s'
21
22   ### SITES
23   servers:
24     managed:
25       ### DEFAULT
26       arvados_workbench_default:
27         enabled: true
28         overwrite: true
29         config:
30           - server:
31             - server_name: workbench.__CLUSTER__.__DOMAIN__
32             - listen:
33               - 80
34             - location /.well-known:
35               - root: /var/www
36             - location /:
37               - return: '301 https://$host$request_uri'
38
39       arvados_workbench_ssl:
40         enabled: true
41         overwrite: true
42         config:
43           - server:
44             - server_name: workbench.__CLUSTER__.__DOMAIN__
45             - listen:
46               - __CONTROLLER_EXT_SSL_PORT__ http2 ssl
47             - index: index.html index.htm
48             - location /:
49               - proxy_pass: 'http://workbench_upstream'
50               - proxy_read_timeout: 300
51               - proxy_connect_timeout: 90
52               - proxy_redirect: 'off'
53               - proxy_set_header: X-Forwarded-Proto https
54               - proxy_set_header: 'Host $http_host'
55               - proxy_set_header: 'X-Real-IP $remote_addr'
56               - proxy_set_header: 'X-Forwarded-For $proxy_add_x_forwarded_for'
57             - include: 'snippets/arvados-snakeoil.conf'
58             - access_log: /var/log/nginx/workbench.__CLUSTER__.__DOMAIN__.access.log combined
59             - error_log: /var/log/nginx/workbench.__CLUSTER__.__DOMAIN__.error.log
60
61       arvados_workbench_upstream:
62         enabled: true
63         overwrite: true
64         config:
65           - server:
66             - listen: 'workbench.internal:9000'
67             - server_name: workbench
68             - root: /var/www/arvados-workbench/current/public
69             - index:  index.html index.htm
70             - passenger_enabled: 'on'
71             # yamllint disable-line rule:line-length
72             - access_log: /var/log/nginx/workbench.__CLUSTER__.__DOMAIN__-upstream.access.log combined
73             - error_log: /var/log/nginx/workbench.__CLUSTER__.__DOMAIN__-upstream.error.log