Nginx代理MinIO时出现“Access Denied“错误

MinIO与Nginx集成时,如果出现"Access Denied"错误,通常意味着Nginx代理的请求没有被正确地转发到MinIO服务。

出现错误:

xml 复制代码
<Error>
    <Code>AccessDenied</Code>
    <Message>Access Denied.</Message>
    <Key>test/1.jpg</Key>
    <BucketName>test1</BucketName>
    <Resource>/test1/test/1.jpg</Resource>
    <RequestId>17C8FCF0E2325480</RequestId>
    <HostId>1379dddc-2b73-49e7-b13d-a8a937600002</HostId>
</Error>

解决方法:

xml 复制代码
server {
    listen       80;
    server_name  localhost;
    
    location /桶命名/ {
        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;
		#MinIO访问地址
        proxy_pass http://localhost:9000;
    }
}
相关推荐
鲁邦通物联网1 小时前
DNV新造船海事网关安全通信架构与系列船验证方法
运维·安全·海事网关·船用网关·海事网络安全·智慧航运·船用路由器
考虑考虑9 小时前
tcpdump指令
运维·后端·自动化运维
无奈笑天下12 小时前
Linux上kdump故障标准处理流程
linux·运维·服务器·github
Csvn12 小时前
Nginx 性能调优与压测:连接账本、找拐点与调优前后对比
后端·nginx
鹤落晴春15 小时前
【MySQL】 | 两阶段提交、主从复制
运维·数据库·mysql
瑞雪兆丰年兮16 小时前
Linux快速入门 第四章 Linux系统常用操作技巧
linux·运维·服务器
无足鸟ICT17 小时前
【RHCA+】介绍proc
linux·运维·服务器
Decay__21 小时前
PostgreSQL 用户权限与安全 —— 角色体系、GRANT 授权、pg_hba.conf 认证、行级安全与审计
运维·数据库·sql·postgresql
fengkai45451 天前
Python运维实战
运维·开发语言·python·ssh·sftp·paramiko
那明眸似水1 天前
LVS高可用负载均衡集群部署实训
运维·负载均衡·lvs