<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:wfw="http://wellformedweb.org/CommentAPI/">
<channel>
<title>ikn0w1T&#039;s blog - https</title>
<link>https://blog.lihan.cyou/index.php/tag/https/</link>
<atom:link href="https://blog.lihan.cyou/index.php/feed/tag/https/" rel="self" type="application/rss+xml" />
<language>zh-CN</language>
<description></description>
<lastBuildDate>Tue, 08 Apr 2025 21:57:00 +0800</lastBuildDate>
<pubDate>Tue, 08 Apr 2025 21:57:00 +0800</pubDate>
<item>
<title>七牛云对象储存实现图床和服务器资源自动备份</title>
<link>https://blog.lihan.cyou/index.php/archives/50/</link>
<guid>https://blog.lihan.cyou/index.php/archives/50/</guid>
<pubDate>Tue, 08 Apr 2025 21:57:00 +0800</pubDate>
<dc:creator>ikn0w1T</dc:creator>
<description><![CDATA[配合picgo实现个人图床搭建七牛云对象存储新建存储空间绑定域名七牛云提供免费cdn加速域名，但是有时长限制，过期会自动失效。因此我们需要自备一个备案过的域名，使用二级域名即可。SSL配置建议配...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<h2>配合picgo实现个人图床搭建</h2><p><a href='https://portal.qiniu.com/kodo/overview'>七牛云对象存储</a></p><h3>新建存储空间</h3><p><img src="https://image.lihan.cyou/20250408212710243.png" referrerpolicy="no-referrer" alt="image-20250408212710142"></p><h3>绑定域名</h3><p>七牛云提供免费cdn加速域名，但是有时长限制，过期会自动失效。因此我们需要自备一个备案过的域名，使用二级域名即可。</p><p><img src="https://image.lihan.cyou/20250408213018831.png" referrerpolicy="no-referrer" alt="image-20250408213018674"></p><h3>SSL配置</h3><p>建议配置ssl证书，七牛云提供免费证书，开启https。经过尝试发现，如果个人网站例如博客是https访问的，而你插入的图片是http，浏览器请求时会自动转为https请求图片，而如果没开启https则无法加载出图片。另外发现一点，如果插入的图片是http并且七牛云也开启了https访问，这个时候其实浏览器（google、edge）是可以正常加载图片的，包括安卓手机自带浏览器。但是当时手里还有一台iPad，经过尝试发现safari浏览器是无法正常加载出图片的，因此最好还是直接插入https地址的图片并且开启https访问。</p><p><img src="https://image.lihan.cyou/20250408213812481.png" referrerpolicy="no-referrer" alt="image-20250408213812339"></p><h3>防盗链</h3><p>如上图我们也可也开启防盗链功能，这样图片只能在我们的网站被访问，直接访问或者放在其他网站上图片是没有被权限访问的。</p><h3>配置picgo</h3><p><img src="https://image.lihan.cyou/20250408214135237.png" referrerpolicy="no-referrer" alt="image-20250408214135191"></p><p>AK和CK在下图位置找到</p><p><img src="https://image.lihan.cyou/20250408214252009.png" referrerpolicy="no-referrer" alt="配置图"></p><p>bucket为新建的存储空间的名字，访问网址为用于cdn加速的子域名，存储区域按照<a href='https://developer.qiniu.com/kodo/1671/region-endpoint-fq'>对应表</a>填写。</p><p>配置完成即可完成图床搭建。</p><h2>配合QiniuFile插件实现朋友圈插件图片上传到七牛云</h2><p>使用方法：</p><ol>
<li>下载本插件，放在 <code>usr/plugins/</code> 目录中，确保文件夹名为 QiniuFile；</li>
</ol><ol start='2' >
<li>激活插件，填写空间名称、Access Key、Secret Key、域名等配置；</li>
</ol><ol start='3' >
<li>保存设置，使用附件上传功能即可看到效果。</li>
</ol><p><img src="https://image.lihan.cyou/20250419130213725.png" referrerpolicy="no-referrer" alt="image-20250419130213548"></p><h2>配合宝塔面板实现服务器资源自动备份</h2><h3>宝塔安装七牛云插件</h3><p><img src="https://image.lihan.cyou/20250408215209122.png" referrerpolicy="no-referrer" alt="七牛云插件"></p><p>同样填入多项信息</p><p><img src="https://image.lihan.cyou/20250408215437182.png" referrerpolicy="no-referrer" alt="image-20250408215437136"></p><h3>计划任务</h3><p>选择备份到七牛云存储即可</p><p><img src="https://image.lihan.cyou/20250408215542049.png" referrerpolicy="no-referrer" alt="image-20250408215541954"></p><p>这样就实现了服务器网站文件和数据库的自动备份，万一服务器崩溃或者其他原因丢失数据也方便还原。</p>
]]></content:encoded>
<slash:comments>1</slash:comments>
<comments>https://blog.lihan.cyou/index.php/archives/50/#comments</comments>
<wfw:commentRss>https://blog.lihan.cyou/index.php/feed/tag/https/</wfw:commentRss>
</item>
</channel>
</rss>