mod_spdy on apache

462 views
Skip to first unread message

Sambi Kolagotla

unread,
Dec 7, 2012, 11:01:27 AM12/7/12
to mod-spdy...@googlegroups.com
We compile our apache with custom prefix location as it gives us control typically to /opt/apache/ location.. and we use RHEL 5.5 how do I compile mod_spdy and mod_ssl for this location ?


Bryan McQuade

unread,
Dec 7, 2012, 1:32:02 PM12/7/12
to mod-spdy...@googlegroups.com
I don't think there is anything in mod_spdy or mod_ssl that should depend on the path prefix. You should be able to build from source and install the resulting modules by hand. See http://code.google.com/p/mod-spdy/wiki/GettingStarted. Let us know if this doesn't work for you.

-bryan

apache

unread,
Dec 7, 2012, 2:17:29 PM12/7/12
to mod-spdy...@googlegroups.com

[root@sandbox src]# ./build_modssl_with_npn.sh

Using buildroot: /tmp/tmp.wWDaa12864

 

Downloading http://www.openssl.org/source/openssl-1.0.1c.tar.gz

######################################################################## 100.0%

Downloading http://archive.apache.org/dist/httpd/httpd-2.2.22.tar.gz

######################################################################## 100.0%

 

Uncompressing openssl-1.0.1c.tar.gz ... done

Uncompressing httpd-2.2.22.tar.gz ... done

Applying Apache mod_ssl NPN patch ... patching file modules/ssl/ssl_private.h

patching file modules/ssl/ssl_engine_init.c

patching file modules/ssl/ssl_engine_io.c

patching file modules/ssl/ssl_engine_kernel.c

patching file modules/ssl/mod_ssl.c

patching file modules/ssl/mod_ssl.h

patching file modules/ssl/ssl_toolkit_compat.h

done

 

Configuring OpenSSL ... done

Building OpenSSL (this may take a while) ... done

 

Configuring Apache mod_ssl ... configure: error: Cannot use an external APR with the bundled APR-util

Failed. Build log at /tmp/httpd_buildlog.mxFll12874.

 

Build aborted.

Cleaning up ... done


trying to run this and getting this error... I 'am trying it where apache is not installled

Bryan McQuade

unread,
Dec 7, 2012, 2:20:23 PM12/7/12
to mod-spdy...@googlegroups.com
Your best bet for mod_ssl may be to apply the patch to your custom source tree and build it there, the same way you built Apache httpd that you have installed on your system.

apache

unread,
Dec 7, 2012, 3:01:12 PM12/7/12
to mod-spdy...@googlegroups.com
I didn't get that Bryan. sorry am new to all this

Bryan McQuade

unread,
Dec 7, 2012, 4:31:42 PM12/7/12
to mod-spdy...@googlegroups.com
It sounds like you probably did a custom build of apache from source in order to install to a custom location. What you'll want to do is take the source code you used for this custom build, apply the mod_ssl NPN patch that is fetched as part of the shell script linked to earlier to your apache codebase, and then re-build apache with your custom location etc. This will produce a mod_ssl that supports NPN. You would then build mod_spdy as normal and install it into your custom modules location.

Take a look at the source of the .sh script you ran and look for the invocation of 'patch'. That's what you'll want to run in your custom apache source tree. Then build your apache as you did when you installed in a custom location.

I hope that helps. If you need more detail you may want to try to find someone nearby, on an IRC channel somewhere, etc, as I think this will be hard to debug further over email due to the high back and forth time.

-bryan



apache

unread,
Dec 7, 2012, 5:22:38 PM12/7/12
to mod-spdy...@googlegroups.com
I might sound too dumb, but this is what I did.. to install apache


tar -zxvf httpd-2.2.22.tar.gz

cd httpd-2.2.22

./configure --prefix=/opt/apache --enable-mods-shared=all
make
make install

Bryan McQuade

unread,
Dec 7, 2012, 8:06:23 PM12/7/12
to mod-spdy...@googlegroups.com
That looks exactly right to me. :) I'll send a few additional commands you can run to patch mod_ssl and get mod_ssl ready to work with SPDY. I don't have access to the computer with that information now but I'll try to follow up early next week.

Thanks,
Bryan

apache

unread,
Dec 7, 2012, 8:58:31 PM12/7/12
to mod-spdy...@googlegroups.com
Thanks Bryan,




that would really help that would help me to setup my first SPDY thanks again Bryan

apache

unread,
Dec 10, 2012, 7:54:02 PM12/10/12
to mod-spdy...@googlegroups.com
Hi Bryan,

Any update on this ?


S

Bryan McQuade

unread,
Dec 11, 2012, 10:43:36 AM12/11/12
to mod-spdy...@googlegroups.com
Hi,

Try this:


tar -zxvf httpd-2.2.22.tar.gz

cd httpd-2.2.22

patch -p0 <mod_ssl_with_npn.patch

./configure --prefix=/opt/apache --enable-mods-shared=all --enable-ssl=shared
make
make install


So the things you need to do differently are:
1. fetch the patch file with wget
2. apply the patch file (the 'patch -p0' line)
3. add --enable-ssl=shared to your configure invocation

Note that you'll need a recent version of openssl installed on your system before you build apache for this to work. If you have an old version this will silently succeed but due to the fact that openssl doesn't provide NPN APIs you won't be able to get SPDY working. What version of openssl do you have installed on your system? If you can download and install the newest version: http://www.openssl.org/source/ (currently that's 1.0.1c) that'd be best.

apache

unread,
Dec 11, 2012, 11:13:23 AM12/11/12
to mod-spdy...@googlegroups.com
Hi Bryan,


Thanks for the instructions, however when i try to do the configure.. I get an error..

configure: error: ...No recognized SSL/TLS toolkit detected

which I mean I guess I don't have a proper opsnssl installed.. 

So I downloaded openssl-1.0.1c

and installed openssl at /opt/openssl.. how do I reference this openssl while configuring it


S

Bryan McQuade

unread,
Dec 11, 2012, 11:22:51 AM12/11/12
to mod-spdy...@googlegroups.com
I'm assuming you installed openssl to /opt/openssl using --openssldir when you ran the openssl config script. If so, change your Apache configure line to:

./configure --prefix=/opt/apache --enable-mods-shared=all --enable-ssl=shared --with-ssl=/opt/openssl

However you may also need to put the directory where openssl installs its shared objects into your LD_LIBRARY_PATH. You should be able to compile with this but if Apache fails to load the openssl shared object at startup time you'll need to get the openssl directory that contains openssl's shared objects into the list of paths that the runtime linker uses to search for its libraries. I don't remember though and it's possible you don't need to worry about this at all.

You can also link openssl statically to get around this. That's what we do in the build_modssl_with_npn.sh script. But the easiest thing for you to do would be to essentially extract the commands from that script, run them in order, but modify them as you need to in order to install things in the proper location.

Once you have this working you'll need to turn on https in your apache config. Google around for it if you're not familiar. Once that's done you need to install mod_spdy. You should be able to follow the standard build instructions for building mod_spdy on our wiki page that I linked to earlier as mod_spdy build should not depend on the install location of your Apache.

Good luck!

-bryan

apache

unread,
Dec 11, 2012, 12:44:14 PM12/11/12
to mod-spdy...@googlegroups.com
Not sure.. if am doing something wrong.. 

but I took a clean system...

started according to your instructions..

checking openssl/ssl.h presence... no
checking for openssl/ssl.h... no
no OpenSSL headers found
checking for SSL-C version... checking sslc.h usability... no
checking sslc.h presence... no
checking for sslc.h... no
no SSL-C headers found
configure: error: ...No recognized SSL/TLS toolkit detected



got this error.. so installed new openssl mentioned into default root...

like 

tar -zxvf openssl-1.0.1c.tar.gz
./config
make
make test
make install

everything went fine.. and still same above error..

and googled error and some one actually said.. am missing openssl-devel 

so downloaded that and ran same above commands

and still same above error persists

what is that am doing wrong ? :)

apache

unread,
Dec 11, 2012, 12:46:52 PM12/11/12
to mod-spdy...@googlegroups.com
Not sure.. if am doing something wrong.. 

but I took a clean system...

started according to your instructions..

checking openssl/ssl.h presence... no
checking for openssl/ssl.h... no
no OpenSSL headers found
checking for SSL-C version... checking sslc.h usability... no
checking sslc.h presence... no
checking for sslc.h... no
no SSL-C headers found
configure: error: ...No recognized SSL/TLS toolkit detected



got this error.. so installed new openssl mentioned into default root...

like 

tar -zxvf openssl-1.0.1c.tar.gz
./config
make
make test
make install

everything went fine.. and still same above error..

and googled error and some one actually said.. am missing openssl-devel 

so downloaded  (openssl-1.0.2-stable-SNAP-20121211.tar.gz)  that and ran same above commands

Bryan McQuade

unread,
Dec 11, 2012, 1:00:57 PM12/11/12
to mod-spdy...@googlegroups.com
Unfortunately I don't know how to provide further help. I've looked over our config script and there's nothing else in there that I'm aware of that you should need. But I'm not an expert on openssl or on apache configuration so I'm sure there's something I just don't know about.

What I do know is that the interesting error messages for you are


checking openssl/ssl.h presence... no
checking for openssl/ssl.h... no
no OpenSSL headers found

If I recall correctly, SSL-C is a different SSL implementation that you don't have on your system, so those failures aren't the important ones.

You also don't need to install any devel packages since the packages are only needed when you aren't building from source. In your case, since you are doing a source install, you shouldn't need any packages.

Sorry to not be able to help you further. Let us know if you figure out how to get it working.

-bryan

apache

unread,
Jan 9, 2013, 11:50:53 AM1/9/13
to mod-spdy...@googlegroups.com
Hi Bryan,

is it possibel fo ryou install Apache 2.2 with mod_spdy enabled and zip it and atatch it here so I can download it and use it ?

prefix you can use is /apps/apache ?





S

apache

unread,
Jan 23, 2013, 3:45:19 AM1/23/13
to mod-spdy...@googlegroups.com
After doing this.. is this going to have a mod_spdy in modules directory.. because.. am able to do this all well and don;t find mod_spdy.so in my modules directory


S

Devendra Joshi

unread,
Jan 31, 2014, 9:49:50 AM1/31/14
to mod-spdy...@googlegroups.com
Hi,

I want to compile mod spdy (from source) with apache 2.2.25.

Please help me in that. I want steps to compile  mod spdy


Devendra
---------------------------------------------------------------------------------------------------------------------------------------------------------

Dave Mankoff

unread,
Jan 31, 2014, 11:31:06 AM1/31/14
to mod-spdy...@googlegroups.com
Howdy Devendra.

The instructions for downloading and compiling mod_spy from source are available at https://code.google.com/p/mod-spdy/wiki/GettingStarted

Alternatively, there are binary packages available: https://developers.google.com/speed/spdy/mod_spdy/


-dave mankoff
Reply all
Reply to author
Forward
0 new messages