错误方式
在点击桶名查看文件时, 会一直处于loading加载中
worker_processes 1 ; events { worker_connections 1024 ;
} http { include mime.types; default_type application/octet-stream; server_tokens off; client_max_body_size 5120m; sendfile on; keepalive_timeout 65 ; server { listen 29000 ; server_name localhost; location /{ proxy_read_timeout 600s; proxy_pass http://172.17.70.70:29000; } }
}
正确方式
worker_processes 1 ; events { worker_connections 1024 ;
} http { include mime.types; default_type application/octet-stream; server_tokens off; client_max_body_size 5120m; sendfile on; keepalive_timeout 65 ; server { listen 29000 ; server_name localhost; location /{ proxy_set_header Host $http_host ; proxy_set_header X-Real-IP $remote_addr ; proxy_set_header REMOTE-HOST $remote_addr ; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ; proxy_set_header X-Forwarded-Proto $scheme ; proxy_http_version 1.1 ; proxy_set_header Upgrade $http_upgrade ; proxy_set_header Connection "Upgrade" ; proxy_read_timeout 600s; chunked_transfer_encoding off; proxy_pass http://172.17.70.70:29000; } }
}