forked from instructure/dynamo-local-admin-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx-proxy.conf
46 lines (38 loc) · 904 Bytes
/
nginx-proxy.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
daemon off;
pid /tmp/nginx.pid;
events {
worker_connections 1024;
}
http {
default_type application/octet-stream;
sendfile on;
error_log /var/log/nginx/error.log debug;
upstream dynamodb {
server 127.0.0.1:8002;
}
upstream admin {
server 127.0.0.1:8001;
}
map $http_x_amz_target $pool {
default "admin";
'~*dynamo' "dynamodb";
}
server {
listen 8000;
server_name dynamo.docker;
location / {
proxy_pass http://$pool;
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-NginX-Proxy true;
proxy_connect_timeout 60;
proxy_send_timeout 60;
proxy_read_timeout 60;
send_timeout 60;
}
}
}