8500afbf52ba991a968e4a58b9b9ed3eec977236
[arvados-formula.git] / test / salt / pillar / examples / nginx_keepproxy_configuration.sls
1 ---
2 # Copyright (C) The Arvados Authors. All rights reserved.
3 #
4 # SPDX-License-Identifier: Apache-2.0
5
6 ### NGINX
7 nginx:
8   ### SERVER
9   server:
10     config:
11       ### STREAMS
12       http:
13         upstream keepproxy_upstream:
14           - server: 'keep.internal:25100 fail_timeout=10s'
15
16   servers:
17     managed:
18       ### DEFAULT
19       arvados_keepproxy_default.conf:
20         enabled: true
21         overwrite: true
22         config:
23           - server:
24             - server_name: keep.fixme.example.net
25             - listen:
26               - 80
27             - location /.well-known:
28               - root: /var/www
29             - location /:
30               - return: '301 https://$host$request_uri'
31
32       arvados_keepproxy_ssl.conf:
33         enabled: true
34         overwrite: true
35         config:
36           - server:
37             - server_name: keep.fixme.example.net
38             - listen:
39               - 443 http2 ssl
40             - index: index.html index.htm
41             - location /:
42               - proxy_pass: 'http://keepproxy_upstream'
43               - proxy_read_timeout: 90
44               - proxy_connect_timeout: 90
45               - proxy_redirect: 'off'
46               - proxy_set_header: X-Forwarded-Proto https
47               - proxy_set_header: 'Host $http_host'
48               - proxy_set_header: 'X-Real-IP $remote_addr'
49               - proxy_set_header: 'X-Forwarded-For $proxy_add_x_forwarded_for'
50               - proxy_buffering: 'off'
51             - client_body_buffer_size: 64M
52             - client_max_body_size: 64M
53             - proxy_http_version: '1.1'
54             - proxy_request_buffering: 'off'
55             - include: 'snippets/ssl_hardening_default.conf'
56             # - include: 'snippets/letsencrypt.conf'
57             - include: 'snippets/ssl_snakeoil.conf'
58             - access_log: /var/log/nginx/keepproxy.fixme.example.net.access.log combined
59             - error_log: /var/log/nginx/keepproxy.fixme.example.net.error.log