简单地说,CloudFlare就是通过基于反向代理的内容分发网络(Content Delivery Network,CDN)及分布式域名解析服务(Distributed Domain Name Server),帮助受保护站点抵御包括拒绝服务攻击在内的大多数网络攻击,确保该网站长期在线,同时提升网站的性能、加载速度以改善访客体验。
对于个人站来说,可以有效防御小规模DDos攻击,可以使用CloudFlare提供的免费ssl证书,可以加速网站的访问(如果是境外服务器的话,国内可以考虑用阿里云的cdn服务),且以上的服务都是免费的!
Active
,说明此时该域名已通过CloudFlare的域名服务器对访问进行解析跟很多域名提供商(如万网,godaddy)的dns配置面板相似,CloudFlare的dns配置不同之处在于可以在Status
项切换开关颜色为「灰色」/「橙色」,灰色表示只使用CloudFlare的dns,橙色表示同时还使用cdn
如图:
在crypto选项卡中,针对ssl设置有四种模式
Off: No visitors will be able to view your site over HTTPS; they will be redirected to HTTP.undefinedFlexible SSL: You cannot configure HTTPS support on your origin, even with a certificate that is not valid for your site. Visitors will be able to access your site over HTTPS, but connections to your origin will be made over HTTP. Note: You may encounter a redirect loop with some origin configurations.undefinedFull SSL: Your origin supports HTTPS, but the certificate installed does not match your domain or is self-signed. Cloudflare will connect to your origin over HTTPS, but will not validate the certificate.undefinedFull (strict): Your origin has a valid certificate (not expired and signed by a trusted CA or Cloudflare Origin CA) installed. Cloudflare will connect over HTTPS and verify the cert on each request.
http
请求到https
配置最小化静态文件
k使用curl命令查看Response Headers
curl -I blog.lestat.me
HTTP/1.1 301 Moved Permanently
Date: Wed, 17 Oct 2018 15:11:38 GMT
Connection: keep-alive
Cache-Control: max-age=3600
Expires: Wed, 17 Oct 2018 16:11:38 GMT
Location: https://blog.lestat.me/
Server: cloudflare
CF-RAY: 46b3b2eb020920c0-LAX
搞定!
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。