Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / tools / salt-install / config_examples / multi_host / aws / pillars / nginx_websocket_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 websocket_upstream:
14           - server: 'localhost:8005 fail_timeout=10s'
15
16   servers:
17     managed:
18       ### DEFAULT
19       arvados_websocket_default.conf:
20         enabled: true
21         overwrite: true
22         config:
23           - server:
24             - server_name: ws.__CLUSTER__.__DOMAIN__
25             - listen:
26               - 80
27             - location /:
28               - return: '301 https://$host$request_uri'
29
30       arvados_websocket_ssl.conf:
31         enabled: true
32         overwrite: true
33         requires:
34           __CERT_REQUIRES__
35         config:
36           - server:
37             - server_name: ws.__CLUSTER__.__DOMAIN__
38             - listen:
39               - __CONTROLLER_EXT_SSL_PORT__ http2 ssl
40             - index: index.html index.htm
41             - location /:
42               - proxy_pass: 'http://websocket_upstream'
43               - proxy_read_timeout: 600
44               - proxy_connect_timeout: 90
45               - proxy_redirect: 'off'
46               - proxy_set_header: 'Host $host'
47               - proxy_set_header: 'X-Real-IP $remote_addr'
48               - proxy_set_header: 'Upgrade $http_upgrade'
49               - proxy_set_header: 'Connection "upgrade"'
50               - proxy_set_header: 'X-Forwarded-For $proxy_add_x_forwarded_for'
51               - proxy_buffering: 'off'
52             - client_body_buffer_size: 64M
53             - client_max_body_size: 64M
54             - proxy_http_version: '1.1'
55             - proxy_request_buffering: 'off'
56             - include: snippets/ssl_hardening_default.conf
57             - ssl_certificate: __CERT_PEM__
58             - ssl_certificate_key: __CERT_KEY__
59             - access_log: /var/log/nginx/ws.__CLUSTER__.__DOMAIN__.access.log combined
60             - error_log: /var/log/nginx/ws.__CLUSTER__.__DOMAIN__.error.log