minio文件服务器开启https

一、准备证书

你要有https安全证书,我的是适用于nginx的证书

私钥 xxxx.key

公钥 xxxx.pem

二、上传证书到minio服务器

然后看看你的minio docker 有没有把 /root/.minio 挂载在主机上,如果有那么把两个证书文件放在/root/.minio/certs目录里面。

三、重启生效

最后重启minio容器就行了

四、验证有无生效

不确定起没起来的话,docker logs minio 看看日志

javascript 复制代码
Status:         1 Online, 0 Offline. 
S3-API: https://192.168.0.126:9000  https://172.17.0.1:9000  https://172.18.0.1:9000  https://172.19.0.1:9000  https://127.0.0.1:9000                       
Console: https://192.168.0.126:9090 https://172.17.0.1:9090 https://172.18.0.1:9090 https://172.19.0.1:9090 https://127.0.0.1:9090            

Documentation: https://min.io/docs/minio/linux/index.html
Warning: The standard parity is set to 0. This can lead to data loss.

 You are running an older version of MinIO released 3 months ago 
 Update: Run `mc admin update`

如果有https的连接那么就成功了

五、js连接minio需要注意的 useSSL需要设置为true

javascript 复制代码
new Minio.Client({
  endPoint: '000.37.00.26',
  port: 9000,
  useSSL: true,
  accessKey: 'yAxxxlOFemqLZ',
  secretKey: 'AbjjzWF1iqnK00000NW8Jo0bbCo21EaY',
})

六、结语

如果你开启了https,那么http就访问不了

有帮助到你的话,赏个赞呗

相关推荐
云上小朱7 分钟前
文件下载-ubuntu操作系统下载指定文件
linux·shell
Mysticbinary7 分钟前
BurpSuite 代理原理 和 证书钉扎检测技术
http·https·网络代理·代理·网络流量·websockets·证书钉扎
hmcjn(小何同学)8 分钟前
轻松Linux-9.进程间通信
linux·运维·服务器·c++·bash
月光在发光21 分钟前
19_内核模块挂载问题处理
linux·运维·服务器
Liang_GaRy30 分钟前
心路历程-Linux如何赋予权限?
linux·运维·服务器
Hello阿尔法35 分钟前
基于 NFS 的文件共享实现
linux·嵌入式
打不了嗝 ᥬ᭄36 分钟前
【Linux】线程概念与控制
linux·c++
pengfei_M37 分钟前
四、FVP启动linux
linux·单片机·嵌入式硬件
路溪非溪43 分钟前
Linux的gpio子系统
linux·运维·服务器