朝目标努力的苍白 2022-09-19 13:55 采纳率: 80%
浏览 231
已结题

nginx代理minio集群

nginx代理minio集群,无法访问被代理服务器的console页面,而是访问至nginx服务器的40391端口

upstream minio_api {
    server node1:9000 max_fails=3 fail_timeout=5s;
    server node2:9000 max_fails=3 fail_timeout=5s;

}
upstream minio_console {
    server node1:40391 max_fails=3 fail_timeout=5s;
    server node2:40391 max_fails=3 fail_timeout=5s;

}

server {
    listen          9445;
    server_name     localhost;
    
    client_max_body_size     1G;   #如果上传文件大于1G,就需要更改这个参数
    client_header_timeout    1m;
    client_body_timeout      1m;
    proxy_connect_timeout    60s;
    proxy_read_timeout       1m;
    proxy_send_timeout       1m;
    
    location / {
        proxy_next_upstream     http_500 http_502 http_503 http_504 error timeout invalid_header;
        proxy_set_header        Host  $host;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass              http://minio_api;
        expires                 0;
    }
}

server {
    listen          9001;
    server_name     localhost;

    client_max_body_size     1G;
    client_header_timeout    1m;
    client_body_timeout      1m;
    proxy_connect_timeout    60s;
    proxy_read_timeout       1m;
    proxy_send_timeout       1m;

    location / {
        proxy_next_upstream     http_500 http_502 http_503 http_504 error timeout invalid_header;
        proxy_set_header        Host  $host;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass              http://minio_console;
        expires                 0;
    }
}
运行结果及报错内容

访问nginx-ip:9001 可进入console页面
访问nginx-ip:9445 并无法跳转至console页面

我想要达到的结果

nginx-ip:9445 进入console页面

  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 9月27日
    • 创建了问题 9月19日

    悬赏问题

    • ¥15 素材场景中光线烘焙后灯光失效
    • ¥15 请教一下各位,为什么我这个没有实现模拟点击
    • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
    • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 保护模式-系统加载-段寄存器