[TOC] #### 十大云存储服务商 --- [https://www.hostucan.cn/cloud-storage](https://www.hostucan.cn/cloud-storage) #### 1. 登陆阿里云官网,开通对象存储服务 OSS --- [https://www.aliyun.com](https://www.aliyun.com) **三种方式都可以找到阿里云对象存储** ![](https://img.itqaq.com/art/content/4ea5103ede84c2b2deea4e4308cfd5d1.png) **第一次使用阿里云对象存储需要先开通该服务** ![](https://img.itqaq.com/art/content/ccffc08b0b4573c37b2ee2f325be1fb5.png) #### 2. 创建存储空间 --- ![](https://img.itqaq.com/art/content/946543b0d58585b77ca7cd732495f8e1.png) #### 3. 绑定自定义域名 --- **这里会自动添加 CNAME 记录,不需要自己去解析域名,此时就可以使用自定义的域名访问文件了** **此时需要等待几分钟,域名解析需要时间** ![](https://img.itqaq.com/art/content/9ab3e7cd7ebe47bac42bb671178bf382.png) #### 4. 配置阿里云CDN加速 --- **点击 `未配置` 会跳转到添加CDN域名页面** ![](https://img.itqaq.com/art/content/97660e335d079f6e1308b5f8b7fe0604.png) **资源分组:选择为默认资源组,其他选项使用默认的即可** **选择资源分组,点击下面的 `下一步`** ![](https://img.itqaq.com/art/content/1a3b7c4e61b1307b2aa7b49aede71a22.png) **提示前往解析CNAME,点击 `返回域名列表`** ![](https://img.itqaq.com/art/content/d8414520f48d5c612ccda60b41e699c9.png) **复制 CDN 域名的 CNAME** ![](https://img.itqaq.com/art/content/374e1846b687df7af81197a364a9f65d.png) **修改解析的CDN域名的CNAME记录值,将刚才复制的CNAME粘贴上去** ![](https://img.itqaq.com/art/content/9f43b0130fc5ddfde8150fdfd448d9a4.png) **等待几分钟,配置成功,点击右侧的域名绑定配置** ![](https://img.itqaq.com/art/content/5a3439c64f868073035da79f348bd6fc.png) ![](https://img.itqaq.com/art/content/e041196a03b6de2ab2e07609d47adf0f.png) #### 5. 购买阿里云免费SSL证书 --- **进入 SSL 应用控制台** ![](https://img.itqaq.com/art/content/387a3c6248af9a829cd1122ee20e831c.png) **购买免费的SSL证书** ![](https://img.itqaq.com/art/content/cd0cccb21fcd8307c5d8bb35d6915bb3.png) **购买成功** ![](https://img.itqaq.com/art/content/42a751581a9d295f5edd62928eed83bb.png) **申请证书** ![](https://img.itqaq.com/art/content/863e5e3e4ce72b2542dbb138dfbf4331.png) **填写证书申请信息** ![](https://img.itqaq.com/art/content/7194a236ec36976d5570c6eefeed5604.png) **验证信息,提交审核** ![](https://img.itqaq.com/art/content/57847e6a6316da93086ef7dc0e7afa4d.png) #### 6. 阿里云CDN配置HTTPS证书 --- **点击 `域名管理` 列表右侧的 `管理`** ![](https://img.itqaq.com/art/content/83e27ed20ce075f8d858e7cf03a340c7.png) **点击 `HTTPS配置` 中的 修改配置** ![](https://img.itqaq.com/art/content/af1221164512f079863b00534be77aca.png) **配置 SSL 证书** ![](https://img.itqaq.com/art/content/b61fdd79b346b02c239bf028b173ba2a.png) ** 强制 HTTPS 跳转 ** ![](https://img.itqaq.com/art/content/734c8a68efa73a66c135e3d2a9bb547d.png) #### 7. 测试是否配置成功 --- **上传一个图片,用于测试访问** ![](https://img.itqaq.com/art/content/b96d803a456c39521de1e8909ea128d5.png) **复制图片地址,在浏览器上直接访问即可** ![](https://img.itqaq.com/art/content/71be7ff69c95343ed1b39a1b5e786793.png) #### 8. 创建阿里云子账户,获取访问密钥 --- **进入RAM 访问控制台** ![](https://img.itqaq.com/art/content/5f0381b4a85e6d6901d20cdee1033a68.png) **创建子用户** ![](https://img.itqaq.com/art/content/af301650d1412194d17d911ae70dd91b.png) **访问方式: 编程访问 (下图截图时忘勾了)** ![](https://img.itqaq.com/art/content/c7fdd88446b4ef770c3a0a5e9e84393d.png) **给子用户仅仅添加对象存储OSS的权限** ![](https://img.itqaq.com/art/content/22dae75be7f17739d1b12efc934dd0b1.png) **点击用户名称,去创建访问密钥** ![](https://img.itqaq.com/art/content/7c09b87b4427704b1c02e8d29211e861.png) **创建访问密钥,记得保存好** ![](https://img.itqaq.com/art/content/41d7f1a7387853704aba77326178d517.png) #### 9. 到此为止,项目中对接阿里云对象存储OSS所需参数都有了 --- ``` Access Key ID:LTAI4FyBaiEUdiQMaymrJwmG Access Key Secret:rCMkgq1RpF3dk0AHoqpPtbzGLIE38K Bucket:chenduxiu 自定义访问URL:https://cdn.itqaq.com ```