
小编去年趁着黑五屯了几个国外的特价主机,一直没想好上手玩啥,刚好最近有个网站的云主机快到期了,过年期间,就安装了宝塔面板9.4.2把网站搭建起来。由于是国外的服务器,国内访问速度有些慢,于是想到了套一个Cloudflare的CDN加速试试。套好CDN加速后,等待解析完成后访问居然报错520,打开网站首页也空白。
百度了一整天也没找到解决的办法,最后想到了用ChatGPT 试一下,很快给出了答案,按照ChatGPT给出的答案,按照步骤,顺利解决了,下面就分享一下具体的步骤。
报错信息:
Error 520 Ray ID: xdd5f1c9fc11axxc • 2025-02-4 06:31:12 UTCWeb server is returning an unknown errorWhat happened?There is an unknown connection issue between Cloudflare and the origin web server. As a result, the web page can not be displayed.What can I do?If you are a visitor of this website:Please try again in a few minutes.If you are the owner of this website:There is an issue between Cloudflare's cache and your origin web server. Cloudflare monitors for these errors and automatically investigates the cause. To help support the investigation, you can pull the corresponding error log from your web server and submit it our support team. Please include the Ray ID (which is at the bottom of this error page). Additional troubleshooting resources.Error 520 Ray ID: xdd5f1c9fc11axxc • 2025-02-4 06:31:12 UTC Web server is returning an unknown error What happened? There is an unknown connection issue between Cloudflare and the origin web server. As a result, the web page can not be displayed. What can I do? If you are a visitor of this website: Please try again in a few minutes. If you are the owner of this website: There is an issue between Cloudflare's cache and your origin web server. Cloudflare monitors for these errors and automatically investigates the cause. To help support the investigation, you can pull the corresponding error log from your web server and submit it our support team. Please include the Ray ID (which is at the bottom of this error page). Additional troubleshooting resources.Error 520 Ray ID: xdd5f1c9fc11axxc • 2025-02-4 06:31:12 UTC Web server is returning an unknown error What happened? There is an unknown connection issue between Cloudflare and the origin web server. As a result, the web page can not be displayed. What can I do? If you are a visitor of this website: Please try again in a few minutes. If you are the owner of this website: There is an issue between Cloudflare's cache and your origin web server. Cloudflare monitors for these errors and automatically investigates the cause. To help support the investigation, you can pull the corresponding error log from your web server and submit it our support team. Please include the Ray ID (which is at the bottom of this error page). Additional troubleshooting resources.
看到这个报错,以为是宝塔面板9.4.2有问题。关闭了Cloudflare的CDN加速后,访问正常。仔细想了下,应该是宝塔收费插件脑残设定造成的,关掉了收费插件Nginx防火墙访问终于正常了。
解决办法
A、正版宝塔面板收费插件Nginx防火墙,开启了严格的全局设置,导致了Cloudflare无法访问源站
![图片[2]-宝塔面板套 Cloudflare的CDN加速后,出现520错误|无法访问源站 Error 解决方法-MOHE素材库-设计行业的乐园,各类素材的矿山!](https://pic.turnfish.top/images/2025/02/14/-CloudflareCDN520--Error--0.jpg)
- 面板 → 软件商店 → Nginx防火墙
- 点击防火墙的设置 → 全局设置 → 禁止国外访问 → 把状态勾选成灰色
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
请登录后查看评论内容