-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathnginx.conf
67 lines (55 loc) · 1.76 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
upstream orthancs {
# check http://nginx.org/en/docs/http/load_balancing.html to define the load balancing policy
server orthanc-a:8042;
server orthanc-b:8042;
server orthanc-c:8042;
}
server {
listen 80;
# the jobs route are forwarded to the job-service that centralizes all jobs from all Orthanc instances
location /orthanc/jobs {
proxy_pass http://job-service:8000;
rewrite /orthanc(.*) $1 break;
proxy_set_header Host $http_host;
proxy_request_buffering off;
proxy_max_temp_file_size 0;
client_max_body_size 0;
}
# load balanced servers are accessible on /orthanc-lb/
location /orthanc/ {
proxy_pass http://orthancs;
rewrite /orthanc(.*) $1 break;
proxy_set_header Host $http_host;
proxy_request_buffering off;
proxy_max_temp_file_size 0;
client_max_body_size 0;
}
# direct accesses to orthanc instances (for debug purpose only)
# orhtanc-a reverse proxy -> forward /orthanc-a/ segment to http://orthanc-a:8042
location /orthanc-a/ {
rewrite /orthanc-a(.*) $1 break;
proxy_pass http://orthanc-a:8042;
proxy_set_header Host $http_host;
proxy_request_buffering off;
proxy_max_temp_file_size 0;
client_max_body_size 0;
}
# orhtanc-b reverse proxy -> forward /orthanc-b/ segment to http://orthanc-b:8042
location /orthanc-b/ {
rewrite /orthanc-b(.*) $1 break;
proxy_pass http://orthanc-b:8042;
proxy_set_header Host $http_host;
proxy_request_buffering off;
proxy_max_temp_file_size 0;
client_max_body_size 0;
}
# orhtanc-b reverse proxy -> forward /orthanc-b/ segment to http://orthanc-c:8042
location /orthanc-c/ {
rewrite /orthanc-b(.*) $1 break;
proxy_pass http://orthanc-c:8042;
proxy_set_header Host $http_host;
proxy_request_buffering off;
proxy_max_temp_file_size 0;
client_max_body_size 0;
}
}