server { listen443 ssl http2; server_name minio.domain.com; ssl_certificate"/etc/letsencrypt/live/minio.domain.com/fullchain.pem"; ssl_certificate_key"/etc/letsencrypt/live/minio.domain.com/privkey.pem";
# 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;
proxy_connect_timeout300; # Default is HTTP/1, keepalive is only enabled in HTTP/1.1 proxy_http_version1.1; proxy_set_header Connection ""; chunked_transfer_encodingoff;
proxy_pass https://localhost:8443; # This uses the upstream directive definition to load balance # proxy_pass https://127.0.0.1; }
# This is necessary to pass the correct IP to be hashed real_ip_header X-Real-IP;
proxy_connect_timeout300;
# To support websockets in MinIO versions released after January 2023 proxy_http_version1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";
chunked_transfer_encodingoff;
proxy_pass https://localhost:9001; # This uses the upstream directive definition to load balance } }
server { listen443 ssl http2; server_name ~^([\w-]+)\.minio\.domain\.com$; # 这里对应泛域名
# 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;
proxy_connect_timeout300; # Default is HTTP/1, keepalive is only enabled in HTTP/1.1 proxy_http_version1.1; proxy_set_header Connection ""; chunked_transfer_encodingoff;
# proxy_pass http://localhost$request_uri; # This uses the upstream directive definition to load balance proxy_pass https://localhost:8443$request_uri; } }