网站使用CloudFlare
CloudFlare類似一個CDN,可以加速網(wǎng)站的訪問速度。
通過安裝Railgun listener,在CloudFlare有一個Sender,兩者之間通過Railgun?協(xié)議通信,
Railgun improves page load time by:
- Compressing content by tracking differences between page versions (down to the byte), only sending the parts that have actually changed.
- Maintaining a single persistent connection for multiple simultaneous requests, eliminating network connection latency.
- Caching dynamic content that changes frequently or is personalized.
?首先搭建一個服務器,確定擁有ipv6地址,有些服務器只有ipv4地址,將域名服務器綁定到CLoudFlare上,為了只能通過IPv6訪問,搭建Apache服務器,監(jiān)聽ipv6端口
在搭建Apache服務器時,使用./configure --disable-v4-mapped?禁止ipv4到ipv6的映射,否則監(jiān)聽端口Listen [::]:80是輸入ipv4的地址仍然可以訪問我們的服務器。
使用安裝Railgun:官方文檔:https://www.cloudflare.com/docs/railgun/installation.html
安裝apache?并開啟https,只能通過IPv6訪問
安裝OpenSSL
下載openssl-1.0.2g.tar.gz
./config --openssldir=/usr/local/ssl make depend make && make install ./config shared --openssldir=/usr/local/ssl make clean make && make installssl將默認安裝到/usr/local/ssl,openssldir 是配置文件目錄
--openssldir=/usr/local/ssl安裝Apache
./configure --enable-rewrite --enable-so --enable-ssl --enable-mods-shared=all --enable-modules=all --enable-mods-shared=all --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-ssl=/usr/local/ssl --disable-v4-mappedmake && make install
配置apache的ssl
httpd.conf中配置
httpd-ssl.conf配置
拷貝server.crt 、server-ca.crt、server.key到/usr/local/httpd/conf目錄下
與50位技術(shù)專家面對面20年技術(shù)見證,附贈技術(shù)全景圖總結(jié)
以上是生活随笔為你收集整理的网站使用CloudFlare的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: kafka+zookeeper安装配置
- 下一篇: apache AH01630: clie