Merge branch '17004-properties-on-output' refs #17004
[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 error_log "{{ERRORLOG}}" info;          # Yes, must be specified here _and_ cmdline
7 events {
8 }
9 http {
10   log_format customlog
11     '[$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 '
12     '"$http_referer" "$http_user_agent"';
13   access_log "{{ACCESSLOG}}" customlog;
14   client_body_temp_path "{{TMPDIR}}/nginx";
15   proxy_temp_path "{{TMPDIR}}/nginx";
16   fastcgi_temp_path "{{TMPDIR}}/nginx";
17   uwsgi_temp_path "{{TMPDIR}}/nginx";
18   scgi_temp_path "{{TMPDIR}}/nginx";
19   upstream controller {
20     server {{LISTENHOST}}:{{CONTROLLERPORT}};
21   }
22   server {
23     listen {{LISTENHOST}}:{{CONTROLLERSSLPORT}} ssl;
24     server_name controller ~.*;
25     ssl_certificate "{{SSLCERT}}";
26     ssl_certificate_key "{{SSLKEY}}";
27     client_max_body_size 0;
28     location  / {
29       proxy_pass http://controller;
30       proxy_set_header Host $http_host;
31       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
32       proxy_set_header X-Forwarded-Proto https;
33       proxy_redirect off;
34       proxy_max_temp_file_size 0;
35       proxy_request_buffering off;
36       proxy_buffering off;
37       proxy_http_version 1.1;
38     }
39   }
40   upstream arv-git-http {
41     server {{LISTENHOST}}:{{GITPORT}};
42   }
43   server {
44     listen {{LISTENHOST}}:{{GITSSLPORT}} ssl;
45     server_name arv-git-http git.*;
46     ssl_certificate "{{SSLCERT}}";
47     ssl_certificate_key "{{SSLKEY}}";
48     location  / {
49       proxy_pass http://arv-git-http;
50       proxy_set_header Host $http_host;
51       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
52       proxy_set_header X-Forwarded-Proto https;
53       proxy_redirect off;
54     }
55   }
56   upstream keepproxy {
57     server {{LISTENHOST}}:{{KEEPPROXYPORT}};
58   }
59   server {
60     listen {{LISTENHOST}}:{{KEEPPROXYSSLPORT}} ssl;
61     server_name keepproxy keep.*;
62     ssl_certificate "{{SSLCERT}}";
63     ssl_certificate_key "{{SSLKEY}}";
64     location  / {
65       proxy_pass http://keepproxy;
66       proxy_set_header Host $http_host;
67       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
68       proxy_set_header X-Forwarded-Proto https;
69       proxy_redirect off;
70
71       proxy_http_version 1.1;
72       proxy_request_buffering off;
73     }
74   }
75   upstream keep-web {
76     server {{LISTENHOST}}:{{KEEPWEBPORT}};
77   }
78   server {
79     listen {{LISTENHOST}}:{{KEEPWEBSSLPORT}} ssl;
80     server_name keep-web collections.* ~\.collections\.;
81     ssl_certificate "{{SSLCERT}}";
82     ssl_certificate_key "{{SSLKEY}}";
83     location  / {
84       proxy_pass http://keep-web;
85       proxy_set_header Host $http_host;
86       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
87       proxy_set_header X-Forwarded-Proto https;
88       proxy_redirect off;
89
90       client_max_body_size 0;
91       proxy_http_version 1.1;
92       proxy_request_buffering off;
93     }
94   }
95   upstream health {
96     server {{LISTENHOST}}:{{HEALTHPORT}};
97   }
98   server {
99     listen {{LISTENHOST}}:{{HEALTHSSLPORT}} ssl;
100     server_name health health.*;
101     ssl_certificate "{{SSLCERT}}";
102     ssl_certificate_key "{{SSLKEY}}";
103     location  / {
104       proxy_pass http://health;
105       proxy_set_header Host $http_host;
106       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
107       proxy_set_header X-Forwarded-Proto https;
108       proxy_redirect off;
109
110       proxy_http_version 1.1;
111       proxy_request_buffering off;
112     }
113   }
114   server {
115     listen {{LISTENHOST}}:{{KEEPWEBDLSSLPORT}} ssl;
116     server_name keep-web-dl download.* ~.*;
117     ssl_certificate "{{SSLCERT}}";
118     ssl_certificate_key "{{SSLKEY}}";
119     location  / {
120       proxy_pass http://keep-web;
121       proxy_set_header Host $http_host;
122       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
123       proxy_set_header X-Forwarded-Proto https;
124       proxy_redirect off;
125
126       client_max_body_size 0;
127       proxy_http_version 1.1;
128       proxy_request_buffering off;
129     }
130   }
131   upstream ws {
132     server {{LISTENHOST}}:{{WSPORT}};
133   }
134   server {
135     listen {{LISTENHOST}}:{{WSSSLPORT}} ssl;
136     server_name websocket ws.*;
137     ssl_certificate "{{SSLCERT}}";
138     ssl_certificate_key "{{SSLKEY}}";
139     location  / {
140       proxy_pass http://ws;
141       proxy_set_header Upgrade $http_upgrade;
142       proxy_set_header Connection "upgrade";
143       proxy_set_header Host $http_host;
144       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
145       proxy_set_header X-Forwarded-Proto https;
146       proxy_redirect off;
147     }
148   }
149   upstream workbench1 {
150     server {{LISTENHOST}}:{{WORKBENCH1PORT}};
151   }
152   server {
153     listen {{LISTENHOST}}:{{WORKBENCH1SSLPORT}} ssl;
154     server_name workbench1 workbench.*;
155     ssl_certificate "{{SSLCERT}}";
156     ssl_certificate_key "{{SSLKEY}}";
157     location  / {
158       proxy_pass http://workbench1;
159       proxy_set_header Host $http_host;
160       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
161       proxy_set_header X-Forwarded-Proto https;
162       proxy_redirect off;
163     }
164   }
165 }