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;
    }
}
相关推荐
xqhoj7 分钟前
Linux学习指南(二)——进程
linux·运维·服务器
yangSnowy14 分钟前
Linux实用命令分析nginx系统日志文件
linux·运维·服务器
2401_8322981021 分钟前
腾讯云TSearch存算分离,破解日志分析算力瓶颈
大数据·运维·数据库
YongCheng_Liang1 小时前
分布式数据库核心原理深度解析:架构、理论与事务解决方案
运维·数据库·sql
chem41111 小时前
ONENET API创建设备并返回设备密钥和设备ID
运维·服务器·mysql
UrSpecial1 小时前
IM项目——消息转发子服务
运维·服务器
菜鸟厚非1 小时前
如何在 Nginx 中配置 HTTPS - Linux
linux·nginx·https
vortex51 小时前
php-fpm + nginx 环境搭建配置与常见问题解决
开发语言·nginx·php
草根站起来1 小时前
S/MIME电子邮件证书
运维·服务器
venus602 小时前
网络运维之ping与telnet的区别
运维·服务器·网络