Enable SPDY in Nginx

What’s SPDY? See Wiki

Nginx finally support spdy protocol in the 1.3.x version, but only preliminary support and may not be very stable, use it at your own risk.

It’s actually very easy to use spdy in nginx as spdy is a patch for nginx in this time. Detialed information can be found at: http://nginx.org/patches/spdy/README.txt

There’s are the main step:

  1. Download the source and unzip it;

  2. Patch the source;

  3. Compile with ssl module
    (ssl connection is required because browser need to use more information to determine whether the server is using the spdy protocol. I saw the news today that http/2.0 will be based on spdy, so in time spdy may not require ssl)
    (OpenSSL 1.0.1 is needed to compile but I think most of the distro has that package)

  4. Done! Find the nginx binary file in nginx-1.3.x/objs/ or simply make install



  1. 下载源代码,解压;

  2. 打补丁包

  3. 编译(需要带ssl模块)
    (编译源码需要有OpenSSL 1.0.1包,不过目前主流发行版都不难找这个包吧)

  4. 编译完成。可以在 nginx-1.3.x/objs/ 目录找到编译好的nginx的二进制文件,或者直接用 make install 安装。

Chrome (need to be turned on at chrome://flags) and Firefox (turned on by default ater version 13) support SPDY protocol at present.
To check the SPDY status, see page: chrome://net-internals/#spdy (for Chrome) or install SPDY indicator (for Firefox).

在Chorme中可以打开页面:chrome://net-internals/#spdy 查看spdy链接的情况,Firefox中可以安装插件:SPDY indicator查看。

Leave a Reply

Your email address will not be published. Required fields are marked *