Merge branch 'master' into 12513-make-dashboard-fast-again
[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 stderr info;          # Yes, must be specified here _and_ cmdline
7 events {
8 }
9 http {
10   access_log {{ACCESSLOG}} combined;
11   upstream arv-git-http {
12     server localhost:{{GITPORT}};
13   }
14   server {
15     listen *:{{GITSSLPORT}} ssl default_server;
16     server_name _;
17     ssl_certificate {{SSLCERT}};
18     ssl_certificate_key {{SSLKEY}};
19     location  / {
20       proxy_pass http://arv-git-http;
21     }
22   }
23   upstream keepproxy {
24     server localhost:{{KEEPPROXYPORT}};
25   }
26   server {
27     listen *:{{KEEPPROXYSSLPORT}} ssl default_server;
28     server_name _;
29     ssl_certificate {{SSLCERT}};
30     ssl_certificate_key {{SSLKEY}};
31     location  / {
32       proxy_pass http://keepproxy;
33     }
34   }
35   upstream keep-web {
36     server localhost:{{KEEPWEBPORT}};
37   }
38   server {
39     listen *:{{KEEPWEBSSLPORT}} ssl default_server;
40     server_name ~^(?<request_host>.*)$;
41     ssl_certificate {{SSLCERT}};
42     ssl_certificate_key {{SSLKEY}};
43     location  / {
44       proxy_pass http://keep-web;
45       proxy_set_header Host $request_host:{{KEEPWEBPORT}};
46       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
47     }
48   }
49   server {
50     listen *:{{KEEPWEBDLSSLPORT}} ssl default_server;
51     server_name ~.*;
52     ssl_certificate {{SSLCERT}};
53     ssl_certificate_key {{SSLKEY}};
54     location  / {
55       proxy_pass http://keep-web;
56       proxy_set_header Host download:{{KEEPWEBPORT}};
57       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
58       proxy_redirect //download:{{KEEPWEBPORT}}/ https://$host:{{KEEPWEBDLSSLPORT}}/;
59     }
60   }
61   upstream ws {
62     server localhost:{{WSPORT}};
63   }
64   server {
65     listen *:{{WSSPORT}} ssl default_server;
66     server_name ~^(?<request_host>.*)$;
67     ssl_certificate {{SSLCERT}};
68     ssl_certificate_key {{SSLKEY}};
69     location  / {
70       proxy_pass http://ws;
71       proxy_set_header Upgrade $http_upgrade;
72       proxy_set_header Connection "upgrade";
73       proxy_set_header Host $request_host:{{WSPORT}};
74       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
75     }
76   }
77 }