spdy的存在主要是为了解决一些http存在的问题。现在一些主流的代理服务器都已经支持spdy,例如nginx,Apache。本文主要介绍在ubuntu 先安装支持spdy的nginx,以及在win7下安装wireshark,抓取spdy协议。
cd /tmp wget http://www.openssl.org/source/openssl-1.0.1e.tar.gz tar zxvpf openssl-1.0.1e.tar.gz ./configure make make install
cd /tmp wget http://nginx.org/download/nginx-1.7.7.tar.gz tar zxvpf nginx-1.7.7.tar.gz cd nginx-1.7.7 ./configure --with-http_ssl_module --with-http_spdy_module --with-openssl=/tmp/openssl-1.0.1e make make install
cd /temp openssl genrsa -des3 -out ./serverkey.pem 2048要求输入一个通行密码(通行短语)
openssl req -new -x509 -key ./serverkey.pem -out ./servercert.pem -subj '/C=GB/ST=XX/O="My Org"/CN="Wireshark dissectable Cert"'需要输入通行密码
openssl rsa –in ./serverkey.pem –out ./server.pem需要输入通行密码
sudo cp serverkey* /usr/local/nginx/conf
server { listen 443 ssl spdy; server_name localhost; ssl on; ssl_certificate servercert.pem; ssl_certificate_key serverkey.pem; ssl_session_timeout 5m; #ssl_ciphers HIGH:!aNULL:!MD5; ssl_ciphers RSA; #ssl_prefer_server_ciphers on; location / { root html; index index.html index.htm; } }注意 ssl_ciphers RSA;,这样做主要是为了wireshark能够对ssl进行解密,如果不这样配置那么即使有了私钥也解密不了。
cd /usr/local/nginx/sbin sudo ./nginx