Merge branch '19109-upload-secondary' refs #19109
[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     }
34   }
35   upstream arv-git-http {
36     server {{LISTENHOST}}:{{GITPORT}};
37   }
38   server {
39     listen {{LISTENHOST}}:{{GITSSLPORT}} ssl;
40     server_name arv-git-http git.*;
41     ssl_certificate "{{SSLCERT}}";
42     ssl_certificate_key "{{SSLKEY}}";
43     location  / {
44       proxy_pass http://arv-git-http;
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;
48       proxy_redirect off;
49     }
50   }
51   upstream keepproxy {
52     server {{LISTENHOST}}:{{KEEPPROXYPORT}};
53   }
54   server {
55     listen {{LISTENHOST}}:{{KEEPPROXYSSLPORT}} ssl;
56     server_name keepproxy keep.*;
57     ssl_certificate "{{SSLCERT}}";
58     ssl_certificate_key "{{SSLKEY}}";
59     location  / {
60       proxy_pass http://keepproxy;
61       proxy_set_header Host $http_host;
62       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
63       proxy_set_header X-Forwarded-Proto https;
64       proxy_redirect off;
65
66       client_max_body_size 67108864;
67       proxy_http_version 1.1;
68       proxy_request_buffering off;
69     }
70   }
71   upstream keep-web {
72     server {{LISTENHOST}}:{{KEEPWEBPORT}};
73   }
74   server {
75     listen {{LISTENHOST}}:{{KEEPWEBSSLPORT}} ssl;
76     server_name keep-web collections.* ~\.collections\.;
77     ssl_certificate "{{SSLCERT}}";
78     ssl_certificate_key "{{SSLKEY}}";
79     location  / {
80       proxy_pass http://keep-web;
81       proxy_set_header Host $http_host;
82       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
83       proxy_set_header X-Forwarded-Proto https;
84       proxy_redirect off;
85
86       client_max_body_size 0;
87       proxy_http_version 1.1;
88       proxy_request_buffering off;
89     }
90   }
91   upstream health {
92     server {{LISTENHOST}}:{{HEALTHPORT}};
93   }
94   server {
95     listen {{LISTENHOST}}:{{HEALTHSSLPORT}} ssl;
96     server_name health health.*;
97     ssl_certificate "{{SSLCERT}}";
98     ssl_certificate_key "{{SSLKEY}}";
99     location  / {
100       proxy_pass http://health;
101       proxy_set_header Host $http_host;
102       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
103       proxy_set_header X-Forwarded-Proto https;
104       proxy_redirect off;
105
106       proxy_http_version 1.1;
107       proxy_request_buffering off;
108     }
109   }
110   server {
111     listen {{LISTENHOST}}:{{KEEPWEBDLSSLPORT}} ssl;
112     server_name keep-web-dl download.* ~.*;
113     ssl_certificate "{{SSLCERT}}";
114     ssl_certificate_key "{{SSLKEY}}";
115     location  / {
116       proxy_pass http://keep-web;
117       proxy_set_header Host $http_host;
118       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
119       proxy_set_header X-Forwarded-Proto https;
120       proxy_redirect off;
121
122       client_max_body_size 0;
123       proxy_http_version 1.1;
124       proxy_request_buffering off;
125     }
126   }
127   upstream ws {
128     server {{LISTENHOST}}:{{WSPORT}};
129   }
130   server {
131     listen {{LISTENHOST}}:{{WSSSLPORT}} ssl;
132     server_name websocket ws.*;
133     ssl_certificate "{{SSLCERT}}";
134     ssl_certificate_key "{{SSLKEY}}";
135     location  / {
136       proxy_pass http://ws;
137       proxy_set_header Upgrade $http_upgrade;
138       proxy_set_header Connection "upgrade";
139       proxy_set_header Host $http_host;
140       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
141       proxy_set_header X-Forwarded-Proto https;
142       proxy_redirect off;
143     }
144   }
145   upstream workbench1 {
146     server {{LISTENHOST}}:{{WORKBENCH1PORT}};
147   }
148   server {
149     listen {{LISTENHOST}}:{{WORKBENCH1SSLPORT}} ssl;
150     server_name workbench1 workbench1.* workbench.*;
151     ssl_certificate "{{SSLCERT}}";
152     ssl_certificate_key "{{SSLKEY}}";
153     location  / {
154       proxy_pass http://workbench1;
155       proxy_set_header Host $http_host;
156       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
157       proxy_set_header X-Forwarded-Proto https;
158       proxy_redirect off;
159     }
160   }
161   upstream workbench2 {
162     server {{LISTENHOST}}:{{WORKBENCH2PORT}};
163   }
164   server {
165     listen {{LISTENHOST}}:{{WORKBENCH2SSLPORT}} ssl;
166     server_name workbench2 workbench2.*;
167     ssl_certificate "{{SSLCERT}}";
168     ssl_certificate_key "{{SSLKEY}}";
169     location / {
170       proxy_pass http://workbench2;
171       proxy_set_header Host $http_host;
172       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
173       proxy_set_header X-Forwarded-Proto https;
174       proxy_redirect off;
175     }
176   }
177 }