天天看點

WordPress設定阿裡雲OSS或七牛雲存儲及CDN無響應的解決辦法及工具合集

一般部落格的資源動靜分離,動态資源傳到對象存儲,實作伺服器瘦身,并啟用CDN加速。

WordPress上也有許多第三方插件幫你完成設定,網上也有許多指導,但是最近筆者嘗試阿裡雲OSS及七牛雲存儲都失敗了,沒有響應。

後來發現要再開一個ossftp端口。

在有公網的伺服器上安裝 ftp server

cd ossftp-1.0.2-linux-mac

解壓:sudo unzip ossftp-1.0.2-linux-mac.zip

運作腳本bash start.sh

上述步驟會啟動一個FTP server, 預設監聽在127.0.0.1的2048端口。同時,為了友善您對FTP server的狀态進行管控,還會啟動一個web伺服器,監聽在127.0.0.1的8192端口。

可以按Ctrl + C 結束了

阿裡雲/七牛插件啟動後,可以看見bucket開始有檔案

若是從頭開始設定,可按以下教程(筆者未親自驗證):

<a href="https://help.aliyun.com/document_detail/32193.html?spm=a2c4g.11186623.6.1059.1Op1BX">Wordpress如何存儲遠端附件到oss</a>

<a href="https://help.aliyun.com/document_detail/32187.html?spm=a2c4g.11186623.6.1069.FDaW9A">有關Object指令</a>

點選下面的連接配接可以獲得阿裡雲所有産品幸運券

<a href="https://promotion.aliyun.com/ntms/act/ambassador/sharetouser.html?userCode=pfj105fy&amp;utm_source=pfj105fy">https://promotion.aliyun.com/ntms/act/ambassador/sharetouser.html?userCode=pfj105fy&amp;utm_source=pfj105fy</a>

<a href="https://developer.qiniu.com/kodo/tools/1302/qshell">qshell</a>

是利用七牛文檔上公開的API實作的一個友善開發者測試和使用七牛API服務的指令行工具。

<a href="https://liuyanzhao.com/2176.html">配置七牛自定義域名cdn加速</a>

點下面連結加入七牛認證後每月10G免費

<a href="https://portal.qiniu.com/signup?code=3lp25vct5v1hu">https://portal.qiniu.com/signup?code=3lp25vct5v1hu</a>

繼續閱讀