Mod_SPDY with Ubuntu 14.04 x64 and Apache 2.4

Since MOD_SPDY was packaged (deb/rpm) up to Apache 2.2, you’ll have to compile from source in order to enable it in Apache 2.4.X.

After several tries, this gentleman here nailed it:

$ cd /tmp
$ sudo apt-get -y install git g++ libapr1-dev libaprutil1-dev curl patch binutils make devscripts
$ git clone https://github.com/eousphoros/mod-spdy.git
$ cd mod-spdy/src
$ ./build_modssl_with_npn.sh
$ chmod +x ./build/gyp_chromium
$ make BUILDTYPE=Release
$ service apache2 stop
$ cd /usr/lib/apache2/modules
$ mv mod_ssl.so mod_ssl.so.bak
$ cd /tmp/mod-spdy/src
$ sudo cp mod_ssl.so /usr/lib/apache2/modules
$ service apache2 start
$ sudo a2enmod ssl
$ service apache2 restart
$ sudo cp out/Release/libmod_spdy.so /usr/lib/apache2/modules/mod_spdy.so
$ echo "LoadModule spdy_module /usr/lib/apache2/modules/mod_spdy.so" | sudo tee /etc/apache2/mods-available/spdy.load
$ echo "SpdyEnabled on" | sudo tee /etc/apache2/mods-available/spdy.conf
$ sudo a2enmod spdy
$ service apache2 restart

PS: don’t use mod_php with SPDY!


Michael writes

Also, I needed to install libpcre3 and libpcre3-dev to get past the “Configuring Apache mod_ssl” in the ./build_modssl_with_npn.sh script (pcre-config for libpcre was not found).

You feedback is continuously appreciated.

Advertisements

26 thoughts on “Mod_SPDY with Ubuntu 14.04 x64 and Apache 2.4

  1. Hi,
    Can you offer any help with a CentOS equivalent? I tried to follow the steps but still haven’t got SPDY active. Any help greatly appreciated.

    • Hello, Mike. It is possible. The price is 22.75GBP/hour. This shouldn’t take more than 30 minutes and the service contains: mod_spdy install, http server configuration (nginx/apache/lighttpd/litespeed) and third party SSL testing for compliance. Let me know if you’re interested: mikeamis.co.uk@plainsight.ro :)

  2. Is this working with Apache 2.4.12 in Ubuntu 14.04 ? I tried even modifying the build_modssl_with_npn.sh script, to use the latest OpenSSL and latest Apache, but got no errors, despite the module seems to be enabled, I don’t think it is working ….

  3. Yeah, I did all that, but didn’t worked. Previously I had apache 2.4.7 (the standard that comes when upgrading to ubuntu 14.04) and it worked fine.

    • Please explain “it didn’t work”. Your SPDY module did not load? Did you check with spdycheck.org? Did you include the spdy directive in the https VirtualHost file and not in the regular VirtualHost file? Did apache crashed? What’s in the error logs?

  4. I got no errors in the logs, it seems like if it is being loaded, but my https site is not using mod_spy at all (and it was before) … no crash, no errors at all. I guess I need to find how to debug mod-spdy to understand why is not being used by the new apache version. All the directives are the same as they where in the previous apache version and it was working …

  5. For example, in chrome and firefox I used the extension to show spdy, and is not showing up at all. It was before. I think I’m going to try to start all the process again, despite I did 2 times. Do you suggest to use the newer openssl openssl-1.0.2.tar.gz with apache 2.4.12 or the one that is listed in the actual scrip (I think it was 1.0.1j ?)

  6. Not sure what happened, but after downloading everything again from scratch, I think is working using latest Open SSL and apache 2.4.12, surprised that works with mpm-event (previously with apache 2.4.7 I needed to go back to mpm-worker). I’ve modified the build_modssl_with_npn.sh script with the lines:
    OPENSSL_SRC_TGZ_URL=”https://www.openssl.org/source/openssl-1.0.2.tar.gz”
    APACHE_HTTPD_SRC_TGZ_URL=”https://archive.apache.org/dist/httpd/httpd-2.4.12.tar.gz”
    and
    download_file $OPENSSL_SRC_TGZ_URL $OPENSSL_SRC_TGZ 38373013fc85c790aabf8837969c5eba
    download_file $APACHE_HTTPD_SRC_TGZ_URL $APACHE_HTTPD_SRC_TGZ ec8676a7fe62433883868b8341da6734

    I will double check and then publish a URL in case somebody want to check/see a sample with a couple of production sites.

  7. Interesting. I decided to give a try to use with apache 2.4.12 the mod_spdy.so and the mod_ssl.so that I compiled when I was running apache 2.4.7 … and now it works perfectly. So it seems to me that there are some issues with the scripts for the compilation ?

  8. Pingback: yobyot,com now supports SPDY | Thinking aloud

  9. Pingback: 在Apache2上使用SPDY + PHP | Crazy Dreaming

  10. Hi bro,

    Thanks for sharing a solution, but I got a problem that the Spdycheck.org keeps telling me that my server doesn’t support spdy!

    I’m a newbie and just a web designer forgive my knowledge ^^

    Best,

  11. Pingback: Opertunistic Encryption mit Firefox 37 und Ubuntu 14.04 LTS | Niklas Rother - Computer & mehr

  12. Hello, i’m here just wanna said.
    If you stucked when ./build_modssl_with_npn.sh :

    Downloading https://www.openssl.org/source/openssl-1.0.2d.tar.gz

    curl: (22) The requested URL returned error: 404 Not Found
    First attempt failed.. trying once more.

    curl: (22) The requested URL returned error: 404 Not Found

    Build aborted.

    just type (edit) :
    ~# nano build_modssl_with_npn.sh

    edit the line :
    OPENSSL_SRC_TGZ_URL=”http://openssl.org/source/1.0.2/openssl-1.0.2d.tar.gz”
    to OPENSSL_SRC_TGZ_URL=”http://openssl.org/source/old/1.0.2/openssl-1.0.2d.tar.gz”

    and save, try to ./build_modssl_with_npn.sh again :)

Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s