问题描述
使用Nginx给minio做端口代理转发 进入管理界面查看桶一直显示loading问题
问题原因
按F12查看了一下,查看桶发起的是 websocket 请求。
解决方案:
在 nginx配置 上加上websocket支持
# 添加了websocket支持
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
我的完整配置
server {
listen 80;
server_name console.minio.summergao.com;
location / {
proxy_pass http://0.0.0.0:37382; # 端口转发
# 添加了websocket支持
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server {
listen 80;
server_name minio.summergao.com;
location / {
proxy_pass http://0.0.0.0:9000; # 端口转发
# 添加了websocket支持
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
记得重载nginx配置才生效
./nginx -s reload
文章来源地址https://www.toymoban.com/news/detail-502174.html文章来源:https://www.toymoban.com/news/detail-502174.html
到了这里,关于【解决】使用Nginx给minio做代理转发 进入管理界面查看桶一直显示loading问题的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!