forked from x110dc/nginx-auth-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproxy.conf
27 lines (23 loc) · 777 Bytes
/
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
server {
listen 80;
server_name SERVER_NAME;
access_log /var/log/nginx-access.log;
error_log /var/log/nginx-error.log;
# required to avoid HTTP 411: see Issue #1486 (https://github.com/dotcloud/docker/issues/1486)
chunked_transfer_encoding on;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 0;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffers 32 4k;
location / {
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass http://UPSTREAM_ADDRESS:UPSTREAM_PORT;
}
}