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;
    }
}
相关推荐
yuanmenghao12 小时前
车载Linux 系统问题定位方法论与实战系列 - 车载 Linux 平台问题定位规范
linux·运维·服务器·网络·c++
qq_5895681013 小时前
centos6.8镜像源yum install不成功,无法通过镜像源下载的解决方式
linux·运维·centos
weixin_5160230714 小时前
linux下fcitx5拼音的安装
linux·运维·服务器
hunter145014 小时前
Linux 进程与计划任务
linux·运维·服务器
楼田莉子15 小时前
Linux学习之磁盘与Ext系列文件
linux·运维·服务器·c语言·学习
陌上花开缓缓归以15 小时前
linux 怎么模拟系统panic重启
linux·运维·服务器
月白风清江有声15 小时前
vscode使用git
linux·运维·服务器
haluhalu.17 小时前
深入理解Linux线程机制:线程概念,内存管理
java·linux·运维
cui__OaO18 小时前
Linux驱动--驱动编译
linux·运维·服务器
Q168496451519 小时前
红帽Linux-进程、ssh、网络、软件包、文件系统
linux·运维·网络