官网文档:https://docs.min.io/docs/how-to-secure-access-to-minio-server-with-tls.html
在${HOME}.minio/certs文件夹下
1、生成私钥
openssl genrsa -out private.key 2048
2、生成自签名证书
创建一个以openssl.conf以下内容命名的文件。设置IP.1和/或DNS.1指向正确的 IP/DNS 地址:
[req]
distinguished_name = req_distinguished_name
x509_extensions = v3_req
prompt = no
[req_distinguished_name]
C = US
ST = VA
L = Somewhere
O = MyOrg
OU = MyOU
CN = MyServerName
[v3_req]
subjectAltName = @alt_names
[alt_names]
IP.1 = 127.0.0.1
DNS.1 = localhost
然后指定文件运行
openssl req -new -x509 -nodes -days 730 -key private.key -out public.crt -config openssl.conf
3、导入证书
keytool -import -alias public -keystore cacerts -file public.crt
changeit
keytool -list -keystore cacerts -alias public
重启minio服务即可支持https
如果想换回http,删掉或重命名private.key密钥文件即可
————————————————
版权声明:本文为CSDN博主「凌晨两点钟同学」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/zzchances/article/details/117471286