Minio 配置 nginx 代理 2022-12-10 Minio Minio 0 评论 字数统计: 253(字) 阅读时长: 1(分) 启动Minio1234567891011121314151617#!/bin/bashBASEPATH=`pwd`NAME=miniodocker rm -f $NAMEdocker run -d --name $NAME \ --restart=always \ -v $BASEPATH/data:/data \ -v $BASEPATH/conf:/root/.minio \ -e "MINIO_SERVER_URL=https://APIHost地址" \ # 文件分享地址 -e "MINIO_BROWSER_REDIRECT_URL=https://minio地址" \ # 页面查看地址 -e "MINIO_ROOT_USER=xxxx" \ -e "MINIO_ROOT_PASSWORD=xxxx" \ minio/minio \ server ./data --console-address ":9001" --address ":9000"docker logs -f $NAME nginx配置12345678910111213141516171819202122232425server { listen 80; listen [::]:80; server_name xxxx; return 301 https://$server_name$request_uri;}server { listen 443 ssl http2; server_name xxxx; location / { proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://minio:9001/; # API自行配置9000 } ssl_certificate /usr/local/openresty/nginx/cert/fullchain.cer; ssl_certificate_key /usr/local/openresty/nginx/cert/ifan.host.key; ssl_protocols TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; access_log /usr/local/openresty/nginx/logs/minio.access.log; error_log /usr/local/openresty/nginx/logs/minio.error.log;} 配置本地mc123456789101112{ "version": "10", "aliases": { "minio": { "url": "https://API地址", "accessKey": "xxxx", "secretKey": "xxx", "api": "s3v4", "path": "auto" } }} 设置永久链接12# 设置桶为匿名可读mc anonymous set download minio/桶名称