SPDY with NGINX on Debian

As per mighty Wikipedia:

SPDY (pronounced speedy) is an open networking protocol developed primarily at Google for transporting web content. SPDY manipulates HTTP traffic, with particular goals of reducing web page load latency and improving web security. SPDY achieves reduced latency through compression, multiplexing, and prioritization although this depends on a combination of network and website deployment conditions.

1. NGINX compiled with SPDY support

2. NGINX setup with https

3. Libpcre version 3 and libpcre3-dev

To install the libraries:

apt-get install libssl-dev libpcre3 libpcre3-dev


then open your nginx site config and find line:

listen          IP ADDRESS:443 ssl;

and replace it with

listen          IP ADDRESS:443 ssl spdy;

then in the location / { section add this bit:

		## Let the browser know about spdy ##
		add_header        Alternate-Protocol  443:npn-spdy/2;

and restart your nginx service

To test it:
Open Firefox and download SPDY indicator plugin.

Job Done