fix(provision): add multi hosts installation examples
[arvados.git] / tools / salt-install / config_examples / multi_host / aws / pillars / nginx_controller_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         'geo $external_client':
14           default: 1
15           '127.0.0.0/8': 0
16           '__CLUSTER_INT_CIDR__': 0
17         upstream controller_upstream:
18           - server: 'localhost:8003  fail_timeout=10s'
19
20   ### SITES
21   servers:
22     managed:
23       ### DEFAULT
24       arvados_controller_default:
25         enabled: true
26         overwrite: true
27         config:
28           - server:
29             - server_name: __CLUSTER__.__DOMAIN__
30             - listen:
31               - 80 default
32             - include: snippets/letsencrypt_well_known.conf
33             - location /:
34               - return: '301 https://$host$request_uri'
35
36       arvados_controller_ssl:
37         enabled: true
38         overwrite: true
39         requires:
40           cmd: create-initial-cert-__CLUSTER__.__DOMAIN__-__CLUSTER__.__DOMAIN__
41         config:
42           - server:
43             - server_name: __CLUSTER__.__DOMAIN__
44             - listen:
45               - __CONTROLLER_EXT_SSL_PORT__ http2 ssl
46             - index: index.html index.htm
47             - location /:
48               - proxy_pass: 'http://controller_upstream'
49               - proxy_read_timeout: 300
50               - proxy_connect_timeout: 90
51               - proxy_redirect: 'off'
52               - proxy_set_header: X-Forwarded-Proto https
53               - proxy_set_header: 'Host $http_host'
54               - proxy_set_header: 'X-Real-IP $remote_addr'
55               - proxy_set_header: 'X-Forwarded-For $proxy_add_x_forwarded_for'
56               - proxy_set_header: 'X-External-Client $external_client'
57             - include: snippets/ssl_hardening_default.conf
58             - include: snippets/__CLUSTER__.__DOMAIN___letsencrypt_cert[.]conf
59             - access_log: /var/log/nginx/controller.__CLUSTER__.__DOMAIN__.access.log combined
60             - error_log: /var/log/nginx/controller.__CLUSTER__.__DOMAIN__.error.log
61             - client_max_body_size: 128m