debian 7 nginx 啓用 SPDY 支持

1) 確保你的OpenSSL版本在1.0.1及以後nginx

2) 下載 nginx/1.5.9:chrome

$ wget http://nginx.org/download/nginx-1.5.9.tar.gz

3) 解壓:segmentfault

$ tar xvfz nginx-1.5.9.tar.gz
 $ cd nginx-1.5.9

4) 下載和打spdy補丁:session

$ wget http://nginx.org/patches/patch.spdy-v31.txt
 $ patch -p1 < patch.spdy-v31.txt

5)配置和編譯nginx:網站

$ ./configure  --prefix=/usr/share/nginx  --sbin-path=/usr/sbin/nginx  --conf-path=/etc/nginx/nginx.conf  --pid-path=/var/run/nginx.pid  --lock-path=/var/lock/nginx.lock  --error-log-path=/var/log/nginx/error.log  --http-log-path=/var/log/access.log  --with-http_ssl_module --with-http_spdy_module
 $ make
 $ make install

6)修改nginx.conf:rest

server {
  listen 443 ssl spdy;
  server_name segmentfault.com;

  ssl_certificate       segmentfault.crt;
  ssl_certificate_key   segmentfault.key;
  此處省略N個字符.....
  }
}

7)重啓nginxcode

$ sudo service nginx restart

8)檢測啓用是否成功server

http://spdycheck.org/#segmentfault.com

或者打開網站,而後查看chrome:
chrome://net-internals/#spdy SPDY sessions裏是否有你的網站。ssl

相關文章
相關標籤/搜索