使用cloudflare加持你的网站
CloudFlare 简单地说,CloudFlare就是通过基于反向代理的内容分发网络(Content Delivery Network,CDN)及分布式域名解析服务(Distributed Domain Name Server),帮助受保护站点抵御包括拒绝服务攻击在内的大多数网络攻击,确保该网站长期在线,同时提升网站的性能、加载速度以改善访客体验。 作用 对于个人站来说,可以有效防御小规模DDos攻击,可以使用CloudFlare提供的免费ssl证书,可以加速网站的访问(如果是境外服务器的话,国内可以考虑用阿里云的cdn服务),且以上的服务都是免费的! 域名服务器修改步骤 注册一个CloudFlare账号后登入 点击「Add Site」,输入域名,之后一直「Next」,系统会加载当前域名的dns列表,不管它,然后复制后面出现的dns服务器地址至当前域名提供商的控制台替换掉默认的dns服务器地址即可,等待几分钟时间即出现Active,说明此时该域名已通过CloudFlare的域名服务器对访问进行解析 dns配置 跟很多域名提供商(如万网,godaddy)的dns配置面板相似,CloudFlare的dns配置不同之处在于可以在Status项切换开关颜色为「灰色」/「橙色」,灰色表示只使用CloudFlare的dns,橙色表示同时还使用cdn 如图: ssl证书配置 在crypto选项卡中,针对ssl设置有四种模式 Off: No visitors will be able to view your site over HTTPS; they will be redirected to HTTP. Flexible 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. Full 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. Full (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. ...