[TOC] #### 十大云存儲(chǔ)服務(wù)商 --- [https://www.hostucan.cn/cloud-storage](https://www.hostucan.cn/cloud-storage) #### 1. 登陸阿里云官網(wǎng),開通對(duì)象存儲(chǔ)服務(wù) OSS --- [https://www.aliyun.com](https://www.aliyun.com) **三種方式都可以找到阿里云對(duì)象存儲(chǔ)** ![](https://img.itqaq.com/art/content/4ea5103ede84c2b2deea4e4308cfd5d1.png) **第一次使用阿里云對(duì)象存儲(chǔ)需要先開通該服務(wù)** ![](https://img.itqaq.com/art/content/ccffc08b0b4573c37b2ee2f325be1fb5.png) #### 2. 創(chuàng)建存儲(chǔ)空間 --- ![](https://img.itqaq.com/art/content/946543b0d58585b77ca7cd732495f8e1.png) #### 3. 綁定自定義域名 --- **這里會(huì)自動(dòng)添加 CNAME 記錄,不需要自己去解析域名,此時(shí)就可以使用自定義的域名訪問文件了** **此時(shí)需要等待幾分鐘,域名解析需要時(shí)間** ![](https://img.itqaq.com/art/content/9ab3e7cd7ebe47bac42bb671178bf382.png) #### 4. 配置阿里云CDN加速 --- **點(diǎn)擊 `未配置` 會(huì)跳轉(zhuǎn)到添加CDN域名頁面** ![](https://img.itqaq.com/art/content/97660e335d079f6e1308b5f8b7fe0604.png) **資源分組:選擇為默認(rèn)資源組,其他選項(xiàng)使用默認(rèn)的即可** **選擇資源分組,點(diǎn)擊下面的 `下一步`** ![](https://img.itqaq.com/art/content/1a3b7c4e61b1307b2aa7b49aede71a22.png) **提示前往解析CNAME,點(diǎn)擊 `返回域名列表`** ![](https://img.itqaq.com/art/content/d8414520f48d5c612ccda60b41e699c9.png) **復(fù)制 CDN 域名的 CNAME** ![](https://img.itqaq.com/art/content/374e1846b687df7af81197a364a9f65d.png) **修改解析的CDN域名的CNAME記錄值,將剛才復(fù)制的CNAME粘貼上去** ![](https://img.itqaq.com/art/content/9f43b0130fc5ddfde8150fdfd448d9a4.png) **等待幾分鐘,配置成功,點(diǎn)擊右側(cè)的域名綁定配置** ![](https://img.itqaq.com/art/content/5a3439c64f868073035da79f348bd6fc.png) ![](https://img.itqaq.com/art/content/e041196a03b6de2ab2e07609d47adf0f.png) #### 5. 購買阿里云免費(fèi)SSL證書 --- **進(jìn)入 SSL 應(yīng)用控制臺(tái)** ![](https://img.itqaq.com/art/content/387a3c6248af9a829cd1122ee20e831c.png) **購買免費(fèi)的SSL證書** ![](https://img.itqaq.com/art/content/cd0cccb21fcd8307c5d8bb35d6915bb3.png) **購買成功** ![](https://img.itqaq.com/art/content/42a751581a9d295f5edd62928eed83bb.png) **申請(qǐng)證書** ![](https://img.itqaq.com/art/content/863e5e3e4ce72b2542dbb138dfbf4331.png) **填寫證書申請(qǐng)信息** ![](https://img.itqaq.com/art/content/7194a236ec36976d5570c6eefeed5604.png) **驗(yàn)證信息,提交審核** ![](https://img.itqaq.com/art/content/57847e6a6316da93086ef7dc0e7afa4d.png) #### 6. 阿里云CDN配置HTTPS證書 --- **點(diǎn)擊 `域名管理` 列表右側(cè)的 `管理`** ![](https://img.itqaq.com/art/content/83e27ed20ce075f8d858e7cf03a340c7.png) **點(diǎn)擊 `HTTPS配置` 中的 修改配置** ![](https://img.itqaq.com/art/content/af1221164512f079863b00534be77aca.png) **配置 SSL 證書** ![](https://img.itqaq.com/art/content/b61fdd79b346b02c239bf028b173ba2a.png) ** 強(qiáng)制 HTTPS 跳轉(zhuǎn) ** ![](https://img.itqaq.com/art/content/734c8a68efa73a66c135e3d2a9bb547d.png) #### 7. 測(cè)試是否配置成功 --- **上傳一個(gè)圖片,用于測(cè)試訪問** ![](https://img.itqaq.com/art/content/b96d803a456c39521de1e8909ea128d5.png) **復(fù)制圖片地址,在瀏覽器上直接訪問即可** ![](https://img.itqaq.com/art/content/71be7ff69c95343ed1b39a1b5e786793.png) #### 8. 創(chuàng)建阿里云子賬戶,獲取訪問密鑰 --- **進(jìn)入RAM 訪問控制臺(tái)** ![](https://img.itqaq.com/art/content/5f0381b4a85e6d6901d20cdee1033a68.png) **創(chuàng)建子用戶** ![](https://img.itqaq.com/art/content/af301650d1412194d17d911ae70dd91b.png) **訪問方式: 編程訪問 (下圖截圖時(shí)忘勾了)** ![](https://img.itqaq.com/art/content/c7fdd88446b4ef770c3a0a5e9e84393d.png) **給子用戶僅僅添加對(duì)象存儲(chǔ)OSS的權(quán)限** ![](https://img.itqaq.com/art/content/22dae75be7f17739d1b12efc934dd0b1.png) **點(diǎn)擊用戶名稱,去創(chuàng)建訪問密鑰** ![](https://img.itqaq.com/art/content/7c09b87b4427704b1c02e8d29211e861.png) **創(chuàng)建訪問密鑰,記得保存好** ![](https://img.itqaq.com/art/content/41d7f1a7387853704aba77326178d517.png) #### 9. 到此為止,項(xiàng)目中對(duì)接阿里云對(duì)象存儲(chǔ)OSS所需參數(shù)都有了 --- ``` Access Key ID:LTAI4FyBaiEUdiQMaymrJwmG Access Key Secret:rCMkgq1RpF3dk0AHoqpPtbzGLIE38K Bucket:chenduxiu 自定義訪問URL:https://cdn.itqaq.com ```