Bug: Config Minio for nginx and public url

36 Views Asked by At

How to config .env / config/config.yaml for minio. By the way, the url is https schema . the server is depend on nginx I am using Source Code Deployment . I want to config minio and work efficient in url binding.

Can be configured to meet conditions

1

There are 1 best solutions below

0
OpenIM On
  1. Nginx Configuration:
upstream minio_s3_2 {
    least_conn;
    server 127.0.0.1:10005;
}

location ^~/im-minio-api/ {
    proxy_set_header Host $http_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;
    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 http://minio_s3_2/; # This uses the upstream directive definition to load balance
}

2.open-im-server/config/config.yaml Configuration:

object:
enable: "minio"
apiURL: "https://lin.blooming.cool/api" //10002
minio:
bucket: "openim"
endpoint: "http://172.28.0.1:10005"
accessKeyID: "root"
secretAccessKey: "openIM123"
sessionToken: ''
signEndpoint: "https://lin.blooming.cool/im-minio-api" //10005