2 {% set nginx_log = '/var/log/nginx' %}
11 upstream websocket_upstream:
12 - server: '127.0.0.1:8005 fail_timeout=10s'
22 - server_name: ws.example.net
25 - location /.well-known:
28 - return: '301 https://$host$request_uri'
35 - server_name: ws.example.net
38 - index: index.html index.htm
40 - proxy_pass: 'http://websocket_upstream'
41 - proxy_read_timeout: 600
42 - proxy_connect_timeout: 90
43 - proxy_redirect: 'off'
44 - proxy_set_header: 'Host $host'
45 - proxy_set_header: 'X-Real-IP $remote_addr'
46 - proxy_set_header: 'Upgrade $http_upgrade'
47 - proxy_set_header: 'Connection "upgrade"'
48 - proxy_set_header: 'X-Forwarded-For $proxy_add_x_forwarded_for'
49 - proxy_buffering: 'off'
50 - client_body_buffer_size: 64M
51 - client_max_body_size: 64M
52 - proxy_http_version: '1.1'
53 - proxy_request_buffering: 'off'
54 # - include: 'snippets/letsencrypt.conf'
55 - include: 'snippets/snakeoil.conf'
56 - access_log: {{ nginx_log }}/ws.example.net.access.log combined
57 - error_log: {{ nginx_log }}/ws.example.net.error.log