-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
49 lines (39 loc) · 1.27 KB
/
nginx.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
47
48
49
# For versions of nginx > 1.3.9 that include chunked transfer encoding support
# Replace with appropriate values where necessary
upstream docker-registry {
server registrybackend:5000;
}
# uncomment if you want a 301 redirect for users attempting to connect
# on port 80
# NOTE: docker client will still fail. This is just for convenience
# server {
# listen *:80;
# server_name my.docker.registry.com;
# return 301 https://$server_name$request_uri;
# }
server {
listen 443 default;
ssl on;
ssl_certificate /etc/ssl/certs/docker-registry;
ssl_certificate_key /etc/ssl/private/docker-registry;
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 off;
include /etc/nginx/docker-registry.conf;
}
location /_ping {
auth_basic off;
include /etc/nginx/docker-registry.conf;
}
location /v1/_ping {
auth_basic off;
include /etc/nginx/docker-registry.conf;
}
location /ca.cert {
auth_basic off;
alias /etc/ssl/certs/docker-registry;
add_header Content-Type: 'text/plain; charset=utf-8';
}
}