惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V2EX - 技术
V2EX - 技术
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Latest news
Latest news
T
The Exploit Database - CXSecurity.com
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
L
Lohrmann on Cybersecurity
aimingoo的专栏
aimingoo的专栏
B
Blog
T
Threat Research - Cisco Blogs
罗磊的独立博客
Application and Cybersecurity Blog
Application and Cybersecurity Blog
P
Proofpoint News Feed
P
Palo Alto Networks Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
宝玉的分享
宝玉的分享
博客园 - 司徒正美
Google DeepMind News
Google DeepMind News
Blog — PlanetScale
Blog — PlanetScale
T
Tor Project blog
阮一峰的网络日志
阮一峰的网络日志
Last Week in AI
Last Week in AI
Martin Fowler
Martin Fowler
酷 壳 – CoolShell
酷 壳 – CoolShell
Recorded Future
Recorded Future
D
DataBreaches.Net
Y
Y Combinator Blog
大猫的无限游戏
大猫的无限游戏
IT之家
IT之家
B
Blog RSS Feed
Scott Helme
Scott Helme
P
Proofpoint News Feed
V
Vulnerabilities – Threatpost
A
Arctic Wolf
Help Net Security
Help Net Security
L
LINUX DO - 最新话题
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Vercel News
Vercel News
AWS News Blog
AWS News Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
S
Schneier on Security
Hacker News: Ask HN
Hacker News: Ask HN
N
Netflix TechBlog - Medium
L
LangChain Blog
博客园 - 叶小钗
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
M
MIT News - Artificial intelligence
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
W
WeLiveSecurity

九月的风

OneXPlayer 飞行家F1Pro「新玩具」 - 九月的风 终不似,少年游「摩旅中国」 - 九月的风 SSHPASS 免交互 SCP 传输文件「备份」 - 九月的风 docker hub 自建镜像加速「可用」 - 九月的风 海尔随身WIFI MF761W 焊接SIM卡槽「打火机工艺」 - 九月的风 海尔随身WIFI F231ZC/M23L/761W 刷机去控教程 - 九月的风 「自作」Chrome_123.0.6312.123_64bit_Portable - 九月的风 Chrome 浏览器关闭左上角搜索标签页的解决办法 - 九月的风 「摘抄」Wordpress 网站性能优化指南(免插件) - 九月的风
「备份」Nginx 反代 Cloudflare 站点 - 九月的风
September · 2024-06-01 · via 九月的风

Nginx 在反代套用了 Cloudflare CDN 的网站时,会出现 502 错误。修复这一个错误只需要在 Nginx 反代配置中修改操作。

代码如下:

location /
{
proxy_pass https://xxx;
proxy_set_header Host xxx;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_ssl_name $http_host;
proxy_ssl_server_name on;
proxy_ssl_protocols TLSv1.2 TLSv1.3;
add_header X-Cache $upstream_cache_status;

#Set Nginx Cache

add_header Cache-Control no-cache;
}

#PROXY-END/

重要设置:
//Nginx SNI
proxy_ssl_name $http_host;
proxy_ssl_server_name on;
//指定 SSL 协议
proxy_ssl_protocols TLSv1.2 TLSv1.3;

互联网上的大部分教程只提了 SNI,自己测试之后还是反复 502,直到设置了指定 SSL 协议之后,成功反代 Cloudflare CDN 站点!

搜索了很多相关的教程资料,有很大一部分超过 99% 的教程都没有提及要指定 SSL 协议,走了不少弯路,特此记录一下备忘!