-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
44 lines (39 loc) · 1.56 KB
/
Copy pathnginx.conf
File metadata and controls
44 lines (39 loc) · 1.56 KB
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
http {
# Add caching later
# proxy_cache_path /data/nginx/cache levels=1:2 keys_zone=endpoint_cache:10m max_size=1g inactive=60m use_temp_path=off;
# proxy_cache endpoint_cache;
# proxy_cache_valid 200 10m; # Cache OK (200) responses for 10 minutes
# proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
server {
listen 6969;
location / {
proxy_pass http://frontend:6971;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /api/ {
proxy_pass http://backend:6970/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
rewrite /api/(.*) /$1 break;
}
location /image/ {
proxy_pass http://frontend:6971/image/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
}
events {
worker_connections 1024;
}