-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnginx.conf
More file actions
28 lines (24 loc) · 887 Bytes
/
nginx.conf
File metadata and controls
28 lines (24 loc) · 887 Bytes
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
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 80;
location / {
proxy_pass http://frontend;
}
location /api {
resolver 127.0.0.11 valid=15s;
proxy_set_header Host $host;
proxy_pass http://server:8001;
rewrite /api/(.*) /$1 break;
}
}
}
events {}