V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Haku
V2EX  ›  MinIO

[求助] Minio 通过 nginx 配置代理访问出错

  •  
  •   Haku · 55 天前 · 797 次点击
    这是一个创建于 55 天前的主题,其中的信息可能已经有所发展或是发生改变。

    报 Access Denied 错误,无论用什么动作都报这个。

    环境上是集群 A ,集群 B ,集群 C ,A 上面架设 minio client ,B 上架设 nginx ,代理到 C 上面的 minio server 。

    目前经过测试发现,本身网络是通的,但是就是无法通过 minio 的验证。连 bucket_exists()都会被拒绝。

    而通过将 minio server 架设到 B 上,再由 A 直接访问,成功。

    将 minio server 架设到 B 上,并同服务器启动 nginx 本地反向代理,失败。同 Access Denied 。

    请问下有老哥有相关经验吗?看起来是 nginx 的问题,但按照网上方法加了大量的 header 参数也没有。

    2 条回复    2025-07-18 09:37:06 +08:00
    oldManNewThought
        1
    oldManNewThought  
       54 天前   ❤️ 2
    正好最近在弄这个
    ```
    server {
    listen 9000;

    location / {
    proxy_pass http://192.168.10.152:9000;
    }
    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 Host $http_host;

    proxy_connect_timeout 300;
    # Default is HTTP/1, keepalive is only enabled in HTTP/1.1
    proxy_http_version 1.1;
    proxy_set_header Connection "";
    chunked_transfer_encoding off;
    }
    ```
    不知道哪个版本开始,底下那几个头得加,不然报错,你试试
    Haku
        2
    Haku  
    OP
       54 天前
    @oldManNewThought 太感谢了,神医啊。V2 一席话,胜加两天班。
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1515 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 16:47 · PVG 00:47 · LAX 09:47 · JFK 12:47
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.