-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathproxy.conf
37 lines (32 loc) · 1.04 KB
/
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
server {
listen 80;
server_name SERVER_NAME;
access_log /var/log/nginx-access.log;
error_log /var/log/nginx-error.log;
#error_log /var/log/nginx-error.log debug;
# 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”; #For Basic Auth
auth_basic_user_file /etc/nginx/.htpasswd; #For Basic Auth
proxy_pass http://upstream:UPSTREAM_PORT;
}
location /_ping {
auth_basic off;
proxy_pass http://upstream:UPSTREAM_PORT;
}
location /v1/_ping {
auth_basic off;
proxy_pass http://upstream:UPSTREAM_PORT;
}
}