plugai_updsrv/nginx/s3.conf

41 lines
1016 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

upstream cloud {
server 127.0.0.1:9000; # MinIO S3 API
keepalive 64;
}
upstream admin {
server 127.0.0.1:9001; # MinIO 控制台 Web UI
keepalive 64;
}
server {
server_name s3.szaiai.com;
client_max_body_size 100M;
# 默认拒绝所有未匹配路径
location / {
return 404;
}
# MinIO S3 API程序访问 S3 时使用这个路径
location /s3/ {
proxy_redirect off;
proxy_pass http://cloud/;
proxy_set_header Host $host;
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;
}
# MinIO 控制台 Web UI
location /console/ {
proxy_redirect off;
proxy_pass http://admin/;
proxy_set_header Host $host;
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;
}
}