Prerequisites

At the time of this writing there are some nginx SPDY patches. Even though they’re in beta stadium, they should perform pretty well.

As mentioned in the README file the following steps have to be done to get SPDY working on nginx development versions (>=v1.3x):

Compile and install nginx development version with SPDY module support

1. Install OpenSSL 1.0.1, it’s required because SPDY module uses
Next Protocol Negotiation TLS extension.

2. Download nginx 1.3.x tar-gzip package, visit
http://nginx.org/en/download.html, or:

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

3. Unpack nginx-1.3:

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

4. Download and apply SPDY module patch from here:

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

5. Configure nginx build:

$ ./configure --with-http_ssl_module

Use the compile flag –with-openssl=/path/to/your/openssl-1.0.1, when building
OpenSSL separately and statically linking to nginx binary.

Use –with-cc-opt and –with-ld-opt accordingly, if OpenSSL
is installed as an optional library, e.g. on Mac OS X:
$ ./configure --with-http_ssl_module \ 
 --with-cc-opt="-I/opt/local/include" \
 --with-ld-opt="-L/opt/local/lib"

6. Build and install nginx:

$ make

Because everything has been statically linked in only one binary, it should be enough to copy the /sbin/nginx binary out of the build directory for testing purposes.

You could use the automatically installation process, but keep in mind, that your config files (could|will) be overwritten (never tried myself, i’ve alwasy copied just the newly compiled binary):

$ make install

Configure nginx to use SPDY wherever possible

To enable SPDY in nginx configuration, just add “spdy” and “ssl”
parameters to the listen directive:

server {
 listen 443 ssl spdy default_server;
 ssl_certificate chainedcert.crt;
 ssl_certificate_key server.key;
...
 }

Benjamin Wiedmann

Benjamin Wiedmann is an IT Professional, Software Developer, Photograph and Musician. Read more...

More Posts - Website

Follow Me:
TwitterLinkedInGoogle Plus


Benjamin Wiedmann

Benjamin Wiedmann is an IT Professional, Software Developer, Photograph and Musician. Read more...

0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.