Skip to content

Commit 4b2faa8

Browse files
committed
Add the initial proxy.conf and Dockerfile
[refs #a413066397e4]
1 parent d6891d4 commit 4b2faa8

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

load_balancer/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM jfahrer/nginx:latest
2+
3+
COPY proxy.conf /etc/nginx/sites-available/default

load_balancer/proxy.conf

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
server {
2+
listen 80 default_server;
3+
4+
resolver 127.0.0.11;
5+
6+
set $protocol http;
7+
set $upstream example.com;
8+
9+
location / {
10+
proxy_pass $protocol://$upstream$request_uri;
11+
12+
proxy_pass_header Authorization;
13+
14+
proxy_http_version 1.1;
15+
proxy_ssl_server_name on;
16+
proxy_set_header Host $upstream;
17+
proxy_set_header X-Real-IP $remote_addr;
18+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
19+
proxy_set_header Connection "";
20+
21+
proxy_buffering off;
22+
proxy_read_timeout 5s;
23+
proxy_redirect off;
24+
proxy_ssl_verify off;
25+
client_max_body_size 0;
26+
}
27+
}

0 commit comments

Comments
 (0)