-
Notifications
You must be signed in to change notification settings - Fork 10
/
nginx.conf
86 lines (71 loc) · 10.2 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#Nginx default.conf
#/etc/nginx/conf.d
proxy_cache_path /usr/share/nginx/cache levels=1:2 keys_zone=my_cache:10m max_size=10g
inactive=60m use_temp_path=off;
server {
listen 80;
server_name localhost;
# means no limit
client_max_body_size 0;
proxy_read_timeout 180s;
gzip on;
gzip_types application/dicom;
gzip_min_length 20;
include /etc/nginx/mime.types;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location /keycloak/auth/ {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
proxy_pass http://epad_keycloak:8080/keycloak/auth/;
}
location /keycloak/ {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
proxy_pass http://epad_keycloak:8080;
}
location /pacs {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
proxy_pass http://epad_dicomweb:8090/pacs;
}
location /api {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
proxy_set_header Host $host;
proxy_pass_request_headers on;
proxy_pass http://epad_lite:8080;
}
location /api/wado {
proxy_cache my_cache;
proxy_ignore_headers Cache-Control;
proxy_cache_valid any 60m;
proxy_cache_key $uri$is_args$args;
proxy_cache_purge PURGE from all;
add_header X-Cache-Status $upstream_cache_status;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
proxy_set_header Host $host;
proxy_pass_request_headers on;
proxy_pass http://epad_lite:8080/api/wado;
}
error_page 404 /404.html;
}