Nerdrium Home

Macintosh

Linux

Web Design

Case Mods

Gardening

Photography

Recipes

 

My Blog

 

Facebook

Twitter

Adding mod_ssl to existing Apache install

by Michael Greifenkamp (August 24th, 2004)

Oh boy. When I originally installed Apache I hadn't given any thought to ever need to use SSL security. Now, as it turns out, I have a project that is going to require doing https. And while the path wasn't necessarily easy, I managed to get it working.

More for my future reference than anything, here's what I had to do, line by line. If this helps someone later, that's great. :)

Here goes:

# cd /usr/local
# bin/apachectl stop
# tar --create --file=apache2.tar apache2
# mv apache2.tar /home
# mv apache2 /home
# cp /usr/kerberos/include/*.h /usr/include/openssl
# cd /home/installers
# tar xvf httpd-2.0.48.tar
# cd httpd-2.0.48
# ./configure --enable-mods-shared=all --enable-ssl
# make
# make install
# cd /usr/local/apache2/conf
# rm httpd.conf
# cp /home/apache2/conf/httpd/conf /usr/local/apache2/conf
# cp /home/apache2/modules/libphp4.so /usr/local/apache2/modules
# rm -rf /usr/local/apache2/logs
# mkdir /usr/local/apache2/logs
# cp /home/apache2/logs/* /usr/local/apache2/logs
# cd /usr/local/apache2/conf
# vi httpd.conf

I scrolled down to somewhere around line 249, in the middle of all of the LoadModule stuff and added:

LoadModule ssl_module modules/mod_ssl.so

:w and :q to save and quit vi editor. Almost finished.

# cd /usr/local/apache2
# bin/apachectl start

And then held my breath.

And lo and behold. It worked. And mod_ssl is now installed and I am able to create keypairs, etc. One of the tricky lines up there that should be mentioned is the one about the include files from the kerberos code. Without those header files (there are three of them) the make will blow up. I originally copied them each one at a time (one of the many times I attempted this on my test web server) but this way I just grab them all at once.

Again, I hope this might help someone in the offing. And feel free to bother me if there are any questions. :)

--Michael