主要介绍从FNL CDN迁移到Fastly的过程,及踩过的坑
~~</e>
首先是得有 Fastly 账号,然后到 <URL url="https://manage.fastly.com/configure">https://manage.fastly.com/configure</URL> 配置CDN服务
配置好后大概是这样
~~</e>
点击 Service configuration -> Edit configuration -> Clone to edit
<LIST type="decimal">
- ~~1.~~ 配置源站
~~</e>
~~</e>
~~</e>
~~</e>
点击 Origins 并找到源站(这里是Serv00)并点击笔图标
<LIST>
- ~~-~~ Name 随便写
- ~~-~~ Address 写源站IP
- ~~-~~ Enable TLS 若源站有则开启(Serv00 Panel域名有,这里开启)
- ~~-~~ Certificate hostname 要和源站 TLS 证书匹配
- ~~-~~ SNI hostname 若源站有证书则点开 Match the SNI hostname to the Certificate hostname
- ~~-~~ Override host 填博客域名,这里是 dev.oneall.eu.org
- ~~-~~ 其他保持默认</LIST></LIST>
<LIST start="2" type="decimal">
- ~~2.~~ 配置加速选项
点击 Settings 并按需求开启(以下是我的配置)
<LIST>
- ~~-~~ Serve stale content on origin failure
- ~~-~~ Force TLS and enable HSTS
- ~~-~~ HTTP/3
- ~~-~~ 其余关闭</LIST></LIST>
<LIST start="3" type="decimal">
- ~~3.~~ 配置缓存
~~</e>
~~</e>
~~</e>
Fastly默认缓存全站,当你发现后台 /admin 进不去或有时能进去,请按照以下配置(我这19个version有10个都是栽在这了)
<LIST>
- ~~-~~ Create cache setting
- ~~-~~ Condition -> attach a condition
- ~~-~~ Name: Is Admin
- ~~-~~ Apply if: req.url ~ <FP char="“">"</FP>^/admin<FP char="”">"</FP>
- ~~-~~ Save and apply to this cache setting
- ~~-~~ Name: 随便写
- ~~-~~ Action: Pass
- ~~-~~ 其他留空</LIST></LIST>
<LIST start="4" type="decimal">
- ~~4.~~ 压缩
~~</e>
点击 Content -> Compression
<LIST>
- ~~-~~ 按需开启</LIST></LIST>
若要配置 SSL 前往 <URL url="https://manage.fastly.com/network/domains">https://manage.fastly.com/network/domains</URL>
~~</e>
将域名接入Fastly
<LIST type="decimal">
- ~~1.~~ 前往 SSL 证书的 View subscription details
- ~~2.~~ 找到 TLS configuration and DNS details -> View / Edit
~~</e>
- ~~3.~~ 按需选择添加记录即可</LIST></r>
2
6
还在为IP不纯、平台风控、频繁验证而烦恼? 丽萨主机海外原生IP VPS,双ISP住宅IP,覆盖美国、香港、日本、新加坡、台湾、德国、越南、英国等热门地区,适合跨境电商、社媒运营、AI工具、流媒体及海外业务使用。
6 条回复
排序