-
Notifications
You must be signed in to change notification settings - Fork 20
/
nginx-proxy.conf
37 lines (28 loc) · 987 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
# just for reference
upstream docker-registry {
server localhost:5000;
}
server {
listen 80;
proxy_set_header Host $http_host; # required for docker client's sake
proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP
proxy_set_header Authorization ""; # see https://github.com/dotcloud/docker-registry/issues/170
proxy_read_timeout 900;
client_max_body_size 0; # disable any limits to avoid HTTP 413 for large image uploads
# required to avoid HTTP 411: see Issue #1486 (https://github.com/docker/docker/issues/1486)
chunked_transfer_encoding on;
location / {
auth_basic "Restricted";
auth_basic_user_file /opt/docker-registry/htpasswd;
proxy_pass http://docker-registry;
}
location /_ping {
auth_basic off;
}
location /v1/_ping {
auth_basic off;
}
location /health {
proxy_pass http://docker-registry/v1/_ping;
}
}