docker/nginx/vhosts/registry.conf

29 lines
1.1 KiB
Plaintext

server
{
listen 80;
listen 443 ssl;
server_name registry.t-aaron.com;
# SSL证书配置
ssl_certificate /etc/nginx/t-aaron.com.pem;
ssl_certificate_key /etc/nginx/t-aaron.com.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
client_max_body_size 10G; # Increase this to an appropriate value
location / {
proxy_pass http://localhost:5252; # Docker Registry 后端地址
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_set_header Authorization ""; # 防止传递认证信息
proxy_read_timeout 900s; # 需要较长时间来推送大型镜像
proxy_redirect off; # 禁用重定向
}
}