HI,
各位好,我在使用Openresty做docker反向代理的时候,遇到报错,请各位帮忙看看,我的问题在哪里
docker login和pull操作均正常,但是在docker push的时候,客户端一直retry,然后报connection reset,在nginx的日志中显示就是400错误,具体信息可见
debug日志就不在这里贴了,可在github中查看。
my config is like this
server {
listen 80;
server_name harbor.example.com;
error_log /tmp/harbor.debug.log debug;
location / {
client_max_body_size 0;
client_body_buffer_size 0;
proxy_pass http://10.10.10.9;
}
}
and tried this ,also failed
server {
listen 80;
server_name harbor.example.com;
error_log /tmp/harbor.debug.log debug;
chunked_transfer_encoding on;
location / {
client_max_body_size 0;
client_body_buffer_size 0;
proxy_buffering off;
proxy_request_buffering off;
add_header 'Docker-Distribution-Api-Version' 'registry/2.0' always;
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 X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Cookie $http_cookie;
proxy_set_header Upgrade $http_upgrade;
proxy_pass http://10.10.10.9;
}
}