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

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

相关推荐
恒创科技HK19 分钟前
如何选30G、60G、100G的香港高防服务器?
运维·服务器
Le_ee27 分钟前
Apache2
服务器·网络安全·apache·web
wanhengidc29 分钟前
云手机 手游专用虚拟手机
运维·服务器·安全·游戏·智能手机
檀越剑指大厂36 分钟前
【Linux系列】Vim 中删除当前光标到行尾
linux·运维·vim
FIavor.1 小时前
我发送给Apifox是http://localhost:9002/goods/getByUserName?name=张三 为什么会是500哪里错了?
java·服务器·网络协议·http
qiuiuiu4132 小时前
正点原子RK3568学习日志-编译第一个驱动程序helloworld
linux·c语言·开发语言·单片机
周之鸥2 小时前
从零部署 Astro 静态网站到云服务器(含 HTTPS 一键配置)
运维·服务器·ubuntu·http·https·astro
林开落L2 小时前
线程进阶:线程池、单例模式与线程安全深度解析
linux·安全·单例模式·线程池
Microsoft Word2 小时前
跨平台向量库:Linux & Windows 上一条龙部署 PostgreSQL 向量扩展
linux·windows·postgresql
noravinsc2 小时前
centos如何做的时间同步
linux·运维·centos