# Set the hosts and volumes MinIO uses at startup # The command uses MinIO expansion notation {x...y} to denote a # sequential series. # # The following example covers four MinIO hosts # with 4 drives each at the specified hostname and drive locations. # The command includes the port that each MinIO server listens on # (default 9000)
# Set all MinIO server options # # The following explicitly sets the MinIO Console listen address to # port 9001 on all network interfaces. The default behavior is dynamic # port selection.
MINIO_OPTS="--console-address :9001"
# Set the root username. This user has unrestricted permissions to # perform S3 and administrative API operations on any resource in the # deployment. # # Defer to your organizations requirements for superadmin user name. # 控制台账户 MINIO_ROOT_USER=minioadmin
# Set the root password # # Use a long, random, unique string that meets your organizations # requirements for passwords. # 控制台密码 MINIO_ROOT_PASSWORD=minio-secret-key-CHANGE-ME
# Set to the URL of the load balancer for the MinIO deployment # This value *must* match across all MinIO servers. If you do # not have a load balancer, set this value to to any *one* of the # MinIO hosts in the deployment as a temporary measure.
# vi /etc/nginx/sites-available/minio # 注意加粗位置 upstream minio_s3 { least_conn; server minio-01.example.com:9000; server minio-02.example.com:9000; server minio-03.example.com:9000; server minio-04.example.com:9000; }
upstream minio_console { least_conn; server minio-01.example.com:9001; server minio-02.example.com:9001; server minio-03.example.com:9001; server minio-04.example.com:9001; }
# Allow special characters in headers ignore_invalid_headers off; # 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_size 0; # Disable buffering proxy_buffering off; proxy_request_buffering off;
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;
proxy_pass https://minio_s3; # This uses the upstream directive definition to load balance }
# This is necessary to pass the correct IP to be hashed real_ip_header X-Real-IP;
proxy_connect_timeout 300;
# To support websockets in MinIO versions released after January 2023 proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";
chunked_transfer_encoding off;
proxy_pass https://minio_console; # This uses the upstream directive definition to load balance } }
# Allow special characters in headers ignore_invalid_headers off; # 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_size 0; # Disable buffering proxy_buffering off; proxy_request_buffering off;
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;
proxy_pass https://minio_s3$request_uri; # This uses the upstream directive definition to load balance } }