close

varnish 是一套效能不錯的reverse proxy server 
但美中不足的,他不支援https
所以如果要讓網站同時支援https , 就必須要另外加裝其他套件來做 ssl termination 的角色
以下範例是利用nginx 來當 ssl termination


cd /etc/nginx/ssl
cat STAR_pass_tw.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > pass.tw.bundle.crt


cd /etc/nginx/conf.d
vi pass.tw.conf
  server {
    listen 443 ssl;
    server_name pass.tw
    ssl on;
    ssl_certificate /etc/nginx/ssl/pass.tw.bundle.crt;
    ssl_certificate_key /etc/nginx/ssl/pass.tw.key;
    ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers   HIGH:!aNULL:!MD5;

    # side note: only use TLS since SSLv2 and SSLv3 have had recent vulnerabilities
    #ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    location / {
      proxy_pass http://127.0.0.1:80;
    }
  }


/etc/init.d/nginx restart

undefined
Nginx技術手札:網頁伺服器應用全攻略

作者: 苗澤  
出版社:上奇資訊  
出版日期:2017/02/23
語言:繁體中文
定價:580元

arrow
arrow

    helloworld 發表在 痞客邦 留言(0) 人氣()