Merge branch '17722-adjust-token-expiry' refs #17722
[arvados.git] / tools / salt-install / config_examples / multi_host / aws / pillars / nginx_keepweb_configuration.sls
1 ---
2 # Copyright (C) The Arvados Authors. All rights reserved.
3 #
4 # SPDX-License-Identifier: AGPL-3.0
5
6 ### NGINX
7 nginx:
8   ### SERVER
9   server:
10     config:
11       ### STREAMS
12       http:
13         upstream collections_downloads_upstream:
14           - server: 'localhost:9002 fail_timeout=10s'
15
16   servers:
17     managed:
18       ### DEFAULT
19       arvados_collections_download_default:
20         enabled: true
21         overwrite: true
22         config:
23           - server:
24             - server_name: '~^((.*\.)?collections|download)\.__CLUSTER__\.__DOMAIN__'
25             - listen:
26               - 80
27             - location /:
28               - return: '301 https://$host$request_uri'
29
30       ### COLLECTIONS
31       arvados_collections_ssl:
32         enabled: true
33         overwrite: true
34         requires:
35           cmd: 'create-initial-cert-collections.__CLUSTER__.__DOMAIN__-collections.__CLUSTER__.__DOMAIN__+*.__CLUSTER__.__DOMAIN__'
36         config:
37           - server:
38             - server_name: '*.collections.__CLUSTER__.__DOMAIN__'
39             - listen:
40               - __CONTROLLER_EXT_SSL_PORT__ http2 ssl
41             - index: index.html index.htm
42             - location /:
43               - proxy_pass: 'http://collections_downloads_upstream'
44               - proxy_read_timeout: 90
45               - proxy_connect_timeout: 90
46               - proxy_redirect: 'off'
47               - proxy_set_header: X-Forwarded-Proto https
48               - proxy_set_header: 'Host $http_host'
49               - proxy_set_header: 'X-Real-IP $remote_addr'
50               - proxy_set_header: 'X-Forwarded-For $proxy_add_x_forwarded_for'
51               - proxy_buffering: 'off'
52             - client_max_body_size: 0
53             - proxy_http_version: '1.1'
54             - proxy_request_buffering: 'off'
55             - include: snippets/ssl_hardening_default.conf
56             - include: snippets/collections.__CLUSTER__.__DOMAIN___letsencrypt_cert[.]conf
57             - access_log: /var/log/nginx/collections.__CLUSTER__.__DOMAIN__.access.log combined
58             - error_log: /var/log/nginx/collections.__CLUSTER__.__DOMAIN__.error.log
59
60       ### DOWNLOAD
61       arvados_download_ssl:
62         enabled: true
63         overwrite: true
64         requires:
65           cmd: create-initial-cert-download.__CLUSTER__.__DOMAIN__-download.__CLUSTER__.__DOMAIN__
66         config:
67           - server:
68             - server_name: download.__CLUSTER__.__DOMAIN__
69             - listen:
70               - __CONTROLLER_EXT_SSL_PORT__ http2 ssl
71             - index: index.html index.htm
72             - location /:
73               - proxy_pass: 'http://collections_downloads_upstream'
74               - proxy_read_timeout: 90
75               - proxy_connect_timeout: 90
76               - proxy_redirect: 'off'
77               - proxy_set_header: X-Forwarded-Proto https
78               - proxy_set_header: 'Host $http_host'
79               - proxy_set_header: 'X-Real-IP $remote_addr'
80               - proxy_set_header: 'X-Forwarded-For $proxy_add_x_forwarded_for'
81               - proxy_buffering: 'off'
82             - client_max_body_size: 0
83             - proxy_http_version: '1.1'
84             - proxy_request_buffering: 'off'
85             - include: snippets/ssl_hardening_default.conf
86             - include: snippets/download.__CLUSTER__.__DOMAIN___letsencrypt_cert[.]conf
87             - access_log: /var/log/nginx/download.__CLUSTER__.__DOMAIN__.access.log combined
88             - error_log: /var/log/nginx/download.__CLUSTER__.__DOMAIN__.error.log