Я развернул docker registry
для хранилища изображений с S3
в качестве хранилища.
И некоторые из моих изображений в GBs
.Поэтому я установил для свойства nginx client_max_body_size
значение 5GB
.Но это все еще дает мне эту ошибку.
error parsing HTTP 413 response body: invalid character '<' looking for beginning of value: "<html>\r\n<head><title>413 Request Entity Too Large</title></head>\r\n<body bgcolor=\"white\">\r\n<center>
413 Слишком большой объект запроса
реестр
upstream registry_upstream{
server 127.0.0.1:5000;
}
server {
server_name registry.domain.com;
# disable any limits to avoid HTTP 413 for large image uploads
client_max_body_size 0;
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
proxy_pass http://registry_upstream;
}
# managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/registry.domain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/registry.domain.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = registry.domain.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name registry.domain.com;
listen 80;
client_max_body_size 0;
return 404; # managed by Certbot
}