upstreamminio_s3{least_conn;serverminio-01.internal-domain.com:9000;serverminio-02.internal-domain.com:9000;serverminio-03.internal-domain.com:9000;serverminio-04.internal-domain.com:9000;}upstreamminio_console{least_conn;serverminio-01.internal-domain.com:9001;serverminio-02.internal-domain.com:9001;serverminio-03.internal-domain.com:9001;serverminio-04.internal-domain.com:9001;}server{listen80;listen[::]:80;server_nameminio.example.net;# Allow special characters in headers
ignore_invalid_headersoff;# Allow any size file to be uploaded.
# Set to a value such as 1000m; to restrict file size to a specific value
client_max_body_size0;# Disable buffering
proxy_bufferingoff;proxy_request_bufferingoff;location/{proxy_set_headerHost$http_host;proxy_set_headerX-Real-IP$remote_addr;proxy_set_headerX-Forwarded-For$proxy_add_x_forwarded_for;proxy_set_headerX-Forwarded-Proto$scheme;proxy_connect_timeout300;# Default is HTTP/1, keepalive is only enabled in HTTP/1.1
proxy_http_version1.1;proxy_set_headerConnection"";chunked_transfer_encodingoff;proxy_passhttps://minio_s3;# This uses the upstream directive definition to load balance
}location/minio/ui/{rewrite^/minio/ui/(.*)/$1break;proxy_set_headerHost$http_host;proxy_set_headerX-Real-IP$remote_addr;proxy_set_headerX-Forwarded-For$proxy_add_x_forwarded_for;proxy_set_headerX-Forwarded-Proto$scheme;proxy_set_headerX-NginX-Proxytrue;# This is necessary to pass the correct IP to be hashed
real_ip_headerX-Real-IP;proxy_connect_timeout300;# To support websockets in MinIO versions released after January 2023
proxy_http_version1.1;proxy_set_headerUpgrade$http_upgrade;proxy_set_headerConnection"upgrade";# Some environments may encounter CORS errors (Kubernetes + Nginx Ingress)
# Uncomment the following line to set the Origin request to an empty string
# proxy_set_header Origin '';
chunked_transfer_encodingoff;proxy_passhttps://minio_console;# This uses the upstream directive definition to load balance
}}
S3 API 签名计算算法 不 支持将 MinIO Server API 托管在 example.net/s3/ 这类路径上的代理方案。
upstreamminio_s3{least_conn;serverminio-01.internal-domain.com:9000;serverminio-02.internal-domain.com:9000;serverminio-03.internal-domain.com:9000;serverminio-04.internal-domain.com:9000;}upstreamminio_console{least_conn;serverminio-01.internal-domain.com:9001;serverminio-02.internal-domain.com:9001;serverminio-03.internal-domain.com:9001;serverminio-04.internal-domain.com:9001;}server{listen80;listen[::]:80;server_nameminio.example.net;# Allow special characters in headers
ignore_invalid_headersoff;# Allow any size file to be uploaded.
# Set to a value such as 1000m; to restrict file size to a specific value
client_max_body_size0;# Disable buffering
proxy_bufferingoff;proxy_request_bufferingoff;location/{proxy_set_headerHost$http_host;proxy_set_headerX-Real-IP$remote_addr;proxy_set_headerX-Forwarded-For$proxy_add_x_forwarded_for;proxy_set_headerX-Forwarded-Proto$scheme;proxy_connect_timeout300;# Default is HTTP/1, keepalive is only enabled in HTTP/1.1
proxy_http_version1.1;proxy_set_headerConnection"";chunked_transfer_encodingoff;proxy_passhttp://minio_s3;# This uses the upstream directive definition to load balance
}}server{listen80;listen[::]:80;server_nameconsole.example.net;# Allow special characters in headers
ignore_invalid_headersoff;# Allow any size file to be uploaded.
# Set to a value such as 1000m; to restrict file size to a specific value
client_max_body_size0;# Disable buffering
proxy_bufferingoff;proxy_request_bufferingoff;location/{proxy_set_headerHost$http_host;proxy_set_headerX-Real-IP$remote_addr;proxy_set_headerX-Forwarded-For$proxy_add_x_forwarded_for;proxy_set_headerX-Forwarded-Proto$scheme;proxy_set_headerX-NginX-Proxytrue;# This is necessary to pass the correct IP to be hashed
real_ip_headerX-Real-IP;proxy_connect_timeout300;# To support websocket
proxy_http_version1.1;proxy_set_headerUpgrade$http_upgrade;proxy_set_headerConnection"upgrade";chunked_transfer_encodingoff;proxy_passhttp://minio_console/;# This uses the upstream directive definition to load balance
}}
S3 API 签名计算算法 不 支持将 MinIO Server API 托管在子路径上的代理方案,例如 minio.example.net/s3/。