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就访问不了

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

相关推荐
vfvfb22 分钟前
bat批量去掉本文件夹中的文件扩展名
服务器·windows·批处理·删除扩展名·bat技巧
jiunian_cn1 小时前
【Linux】centos软件安装
linux·运维·centos
程序员JerrySUN1 小时前
[特殊字符] 深入理解 Linux 内核进程管理:架构、核心函数与调度机制
java·linux·架构
孤寂大仙v1 小时前
【计算机网络】非阻塞IO——select实现多路转接
linux·计算机网络
玩转4G物联网2 小时前
零基础玩转物联网-串口转以太网模块如何快速实现与TCP服务器通信
服务器·网络·物联网·网络协议·tcp/ip·http·fs100p
派阿喵搞电子2 小时前
Ubuntu下有关UDP网络通信的指令
linux·服务器·网络
Evan_ZGYF丶2 小时前
【PCIe总线】 -- PCI、PCIe相关实现
linux·嵌入式·pcie·pci
舰长1152 小时前
Ubuntu挂载本地镜像源(像CentOS 一样挂载本地镜像源)
linux·ubuntu·centos
程序员JerrySUN2 小时前
全面理解 Linux 内核性能问题:分类、实战与调优策略
java·linux·运维·服务器·单片机
Theodore_10222 小时前
大数据(2) 大数据处理架构Hadoop
大数据·服务器·hadoop·分布式·ubuntu·架构