1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: Apache-2.0
6 error_log "{{ERRORLOG}}" info; # Yes, must be specified here _and_ cmdline
11 '[$time_local] $server_name $status $body_bytes_sent $request_time $request_method "$scheme://$http_host$request_uri" $remote_addr:$remote_port '
12 '"$http_referer" "$http_user_agent"';
13 access_log "{{ACCESSLOG}}" customlog;
14 client_body_temp_path "{{TMPDIR}}";
15 proxy_temp_path "{{TMPDIR}}";
16 fastcgi_temp_path "{{TMPDIR}}";
17 uwsgi_temp_path "{{TMPDIR}}";
18 scgi_temp_path "{{TMPDIR}}";
19 upstream arv-git-http {
20 server localhost:{{GITPORT}};
23 listen *:{{GITSSLPORT}} ssl default_server;
24 server_name arv-git-http;
25 ssl_certificate "{{SSLCERT}}";
26 ssl_certificate_key "{{SSLKEY}}";
28 proxy_pass http://arv-git-http;
29 proxy_set_header Host $http_host;
30 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
31 proxy_set_header X-Forwarded-Proto https;
36 server localhost:{{KEEPPROXYPORT}};
39 listen *:{{KEEPPROXYSSLPORT}} ssl default_server;
40 server_name keepproxy;
41 ssl_certificate "{{SSLCERT}}";
42 ssl_certificate_key "{{SSLKEY}}";
44 proxy_pass http://keepproxy;
45 proxy_set_header Host $http_host;
46 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
47 proxy_set_header X-Forwarded-Proto https;
50 proxy_http_version 1.1;
51 proxy_request_buffering off;
55 server localhost:{{KEEPWEBPORT}};
58 listen *:{{KEEPWEBSSLPORT}} ssl default_server;
60 ssl_certificate "{{SSLCERT}}";
61 ssl_certificate_key "{{SSLKEY}}";
63 proxy_pass http://keep-web;
64 proxy_set_header Host $http_host;
65 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
66 proxy_set_header X-Forwarded-Proto https;
69 client_max_body_size 0;
70 proxy_http_version 1.1;
71 proxy_request_buffering off;
75 listen *:{{KEEPWEBDLSSLPORT}} ssl default_server;
76 server_name keep-web-dl ~.*;
77 ssl_certificate "{{SSLCERT}}";
78 ssl_certificate_key "{{SSLKEY}}";
80 proxy_pass http://keep-web;
81 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
82 proxy_set_header X-Forwarded-Proto https;
84 client_max_body_size 0;
85 proxy_http_version 1.1;
86 proxy_request_buffering off;
88 # Unlike other proxy sections, here we need to override the
89 # requested Host header and use proxy_redirect because of the
90 # way the test suite orchestrates services. Keep-web's "download
91 # only" behavior relies on the Host header matching a configured
92 # value, but when run_test_servers.py writes keep-web's command
93 # line, the keep-web-dl TLS port (which clients will connect to
94 # and include in their Host header) has not yet been assigned.
96 # In production, "proxy_set_header Host $http_host;
97 # proxy_redirect off;" works: keep-web's redirect URLs will
98 # match the request URL received by Nginx.
100 # Here, keep-web will issue redirects to https://download/ and
101 # Nginx will rewrite them.
103 proxy_set_header Host download;
104 proxy_redirect https://download/ https://$host:{{KEEPWEBDLSSLPORT}}/;
108 server localhost:{{WSPORT}};
111 listen *:{{WSSPORT}} ssl default_server;
112 server_name websocket;
113 ssl_certificate "{{SSLCERT}}";
114 ssl_certificate_key "{{SSLKEY}}";
116 proxy_pass http://ws;
117 proxy_set_header Upgrade $http_upgrade;
118 proxy_set_header Connection "upgrade";
119 proxy_set_header Host $http_host;
120 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
121 proxy_set_header X-Forwarded-Proto https;
125 upstream controller {
126 server localhost:{{CONTROLLERPORT}};
129 listen *:{{CONTROLLERSSLPORT}} ssl default_server;
130 server_name controller;
131 ssl_certificate "{{SSLCERT}}";
132 ssl_certificate_key "{{SSLKEY}}";
134 proxy_pass http://controller;
135 proxy_set_header Host $http_host;
136 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
137 proxy_set_header X-Forwarded-Proto https;