19126: update the nginx template used by our tests and arvados-server
[arvados.git] / sdk / python / tests / nginx.conf
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: Apache-2.0
4
5 daemon off;
6 events {
7 }
8 http {
9   log_format customlog
10     '[$time_local] "$http_x_request_id" $server_name $status $body_bytes_sent $request_time $request_method "$scheme://$http_host$request_uri" $remote_addr:$remote_port '
11     '"$http_referer" "$http_user_agent"';
12   access_log "{{ACCESSLOG}}" customlog;
13   client_body_temp_path "{{TMPDIR}}";
14   proxy_temp_path "{{TMPDIR}}";
15   fastcgi_temp_path "{{TMPDIR}}";
16   uwsgi_temp_path "{{TMPDIR}}";
17   scgi_temp_path "{{TMPDIR}}";
18   upstream controller {
19     server {{LISTENHOST}}:{{CONTROLLERPORT}};
20   }
21   server {
22     listen {{LISTENHOST}}:{{CONTROLLERSSLPORT}} ssl;
23     server_name controller ~.*;
24     ssl_certificate "{{SSLCERT}}";
25     ssl_certificate_key "{{SSLKEY}}";
26     client_max_body_size 0;
27     location  / {
28       proxy_pass http://controller;
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;
32       proxy_redirect off;
33       proxy_request_buffering off;
34       proxy_max_temp_file_size 0;
35     }
36   }
37   upstream arv-git-http {
38     server {{LISTENHOST}}:{{GITPORT}};
39   }
40   server {
41     listen {{LISTENHOST}}:{{GITSSLPORT}} ssl;
42     server_name arv-git-http git.*;
43     ssl_certificate "{{SSLCERT}}";
44     ssl_certificate_key "{{SSLKEY}}";
45     location  / {
46       proxy_pass http://arv-git-http;
47       proxy_set_header Host $http_host;
48       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
49       proxy_set_header X-Forwarded-Proto https;
50       proxy_redirect off;
51     }
52   }
53   upstream keepproxy {
54     server {{LISTENHOST}}:{{KEEPPROXYPORT}};
55   }
56   server {
57     listen {{LISTENHOST}}:{{KEEPPROXYSSLPORT}} ssl;
58     server_name keepproxy keep.*;
59     ssl_certificate "{{SSLCERT}}";
60     ssl_certificate_key "{{SSLKEY}}";
61     location  / {
62       proxy_pass http://keepproxy;
63       proxy_set_header Host $http_host;
64       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
65       proxy_set_header X-Forwarded-Proto https;
66       proxy_redirect off;
67
68       client_max_body_size 67108864;
69       proxy_http_version 1.1;
70       proxy_request_buffering off;
71     }
72   }
73   upstream keep-web {
74     server {{LISTENHOST}}:{{KEEPWEBPORT}};
75   }
76   server {
77     listen {{LISTENHOST}}:{{KEEPWEBSSLPORT}} ssl;
78     server_name keep-web collections.* ~\.collections\.;
79     ssl_certificate "{{SSLCERT}}";
80     ssl_certificate_key "{{SSLKEY}}";
81     location  / {
82       proxy_pass http://keep-web;
83       proxy_set_header Host $http_host;
84       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
85       proxy_set_header X-Forwarded-Proto https;
86       proxy_redirect off;
87
88       client_max_body_size 0;
89       proxy_http_version 1.1;
90       proxy_request_buffering off;
91     }
92   }
93   upstream health {
94     server {{LISTENHOST}}:{{HEALTHPORT}};
95   }
96   server {
97     listen {{LISTENHOST}}:{{HEALTHSSLPORT}} ssl;
98     server_name health health.*;
99     ssl_certificate "{{SSLCERT}}";
100     ssl_certificate_key "{{SSLKEY}}";
101     location  / {
102       proxy_pass http://health;
103       proxy_set_header Host $http_host;
104       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
105       proxy_set_header X-Forwarded-Proto https;
106       proxy_redirect off;
107
108       proxy_http_version 1.1;
109       proxy_request_buffering off;
110     }
111   }
112   server {
113     listen {{LISTENHOST}}:{{KEEPWEBDLSSLPORT}} ssl;
114     server_name keep-web-dl download.* ~.*;
115     ssl_certificate "{{SSLCERT}}";
116     ssl_certificate_key "{{SSLKEY}}";
117     location  / {
118       proxy_pass http://keep-web;
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;
122       proxy_redirect off;
123
124       client_max_body_size 0;
125       proxy_http_version 1.1;
126       proxy_request_buffering off;
127     }
128   }
129   upstream ws {
130     server {{LISTENHOST}}:{{WSPORT}};
131   }
132   server {
133     listen {{LISTENHOST}}:{{WSSSLPORT}} ssl;
134     server_name websocket ws.*;
135     ssl_certificate "{{SSLCERT}}";
136     ssl_certificate_key "{{SSLKEY}}";
137     location  / {
138       proxy_pass http://ws;
139       proxy_set_header Upgrade $http_upgrade;
140       proxy_set_header Connection "upgrade";
141       proxy_set_header Host $http_host;
142       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
143       proxy_set_header X-Forwarded-Proto https;
144       proxy_redirect off;
145     }
146   }
147   upstream workbench1 {
148     server {{LISTENHOST}}:{{WORKBENCH1PORT}};
149   }
150   server {
151     listen {{LISTENHOST}}:{{WORKBENCH1SSLPORT}} ssl;
152     server_name workbench1 workbench1.* workbench.*;
153     ssl_certificate "{{SSLCERT}}";
154     ssl_certificate_key "{{SSLKEY}}";
155     location  / {
156       proxy_pass http://workbench1;
157       proxy_set_header Host $http_host;
158       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
159       proxy_set_header X-Forwarded-Proto https;
160       proxy_redirect off;
161     }
162   }
163   upstream workbench2 {
164     server {{LISTENHOST}}:{{WORKBENCH2PORT}};
165   }
166   server {
167     listen {{LISTENHOST}}:{{WORKBENCH2SSLPORT}} ssl;
168     server_name workbench2 workbench2.*;
169     ssl_certificate "{{SSLCERT}}";
170     ssl_certificate_key "{{SSLKEY}}";
171     location / {
172       proxy_pass http://workbench2;
173       proxy_set_header Host $http_host;
174       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
175       proxy_set_header X-Forwarded-Proto https;
176       proxy_redirect off;
177     }
178   }
179 }