15cc63d7280015ef0f87e9b872cd270a1b27a759
[arvados-formula.git] / test / salt / pillar / examples / nginx_controller_configuration.sls
1 ---
2 {% set nginx_log = '/var/log/nginx' %}
3
4 ### NGINX
5 nginx:
6   ### SERVER
7   server:
8     config:
9
10       ### STREAMS
11       http:
12         'geo $external_client':
13           default: 1
14           '127.0.0.0/24': 0
15         upstream controller_upstream:
16           - server: 'localhost:8003  fail_timeout=10s'
17
18   ### SITES
19   servers:
20     managed:
21       ### DEFAULT
22       arvados_controller_default:
23         enabled: true
24         overwrite: true
25         config:
26           - server:
27             - server_name: example.net api.example.net
28             - listen:
29               - 80 default
30             - location /.well-known:
31               - root: /var/www
32             - location /:
33               - return: '301 https://$host$request_uri'
34
35       arvados_controller:
36         enabled: true
37         overwrite: true
38         config:
39           - server:
40             - server_name: example.net
41             - listen:
42               - 443 http2 ssl
43             - index: index.html index.htm
44             - location /:
45               - proxy_pass: 'http://controller_upstream'
46               - proxy_read_timeout: 300
47               - proxy_connect_timeout: 90
48               - proxy_redirect: 'off'
49               - proxy_set_header: X-Forwarded-Proto https
50               - proxy_set_header: 'Host $http_host'
51               - proxy_set_header: 'X-Real-IP $remote_addr'
52               - proxy_set_header: 'X-Forwarded-For $proxy_add_x_forwarded_for'
53               - proxy_set_header: 'X-External-Client $external_client'
54             # - include: 'snippets/letsencrypt.conf'
55             - include: 'snippets/snakeoil.conf'
56             - access_log: {{ nginx_log }}/example.net.access.log combined
57             - error_log: {{ nginx_log }}/example.net.error.log
58             - client_max_body_size: 128m