本来是计划把本站放到 Cloudflare 的防护之后的,不过简单配置之后发现会导致站点无法访问,错误信息显示为“Too many redirects”。已经过去挺久了,但后来一直没有精力继续这个错误的修正,而是把 Cloudflare 撤掉了。当时查到的几篇资料的 URL 备档在此,以备后续。
- Cloudflare and nginx: Too many redirects:https://stackoverflow.com/questions/35143193/cloudflare-and-nginx-too-many-redirects;
- Redirect loop using cloudflare’s Flexible ssl:https://serverfault.com/questions/653976/redirect-loop-using-cloudflares-flexible-ssl;
- HTTP to HTTPS Nginx too many redirects:https://stackoverflow.com/questions/41583088/http-to-https-nginx-too-many-redirects。
实际情况还包括,虚拟主机上面跑着的不止一个站点。