Compiling mod_ssl into Apache 1.3.9
I was dealt a project recently that involved getting mod_ssl compiled into a series of production Apache 1.3.9 web servers. The staging servers had been upgraded a couple years earlier and were working as expected by the project team. In my first attempt at this problem, all I did was tar up the server root in staging and expand it on one of the production servers after making a backup copy of the current server root. This method worked despite an error at start up complaining about instability. Since I was tired and needed to put this task behind me, I rolled the staging instance across all production servers making the necessary config changes for production (IP address changes, SSL cert filenames and paths, etc).
The next day one of the tech support reps for the business asked me about the error upon startup since he had to restart all the production web servers due to a crash. I mentioned the crash is probably due to this error upon startup:
‘[warn] Loaded DSO /usr/lib/apache/mod_ssl.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with -DEAPI)’
So, basically what I realized is that mod_ssl, although it can be loaded as a DSO, its better if it can be compiled into Apache to make this error go away upon startup.
So, here is what I did after lots of contemplation:
$ gunzip < mod_ssl-2. 8. 23-1.3.33. tar. gz | tar xvf
$ gunzip < apache_1. 3. 33. tar. gz | tar xvf
$ cd mod_ssl-2.8.23-1. 3. 33
$ ./configure –with-apache=. ./apache_1.3. 33
$ cd ../apache_1.3.x
$ SSL_BASE=/usr/local/ssl/ ./configure –enable-module=ssl –prefix=/usr/local/apache
$ make# make install
Now proceed with the following commands (Bourne-Shell syntax):
$ cd ../apache_1.3.39
$ SSL_BASE=/path/to/openssl ./configure … –enable-module=ssl
$ make certificate
$ make install
I then had to go and recompile PHP. I used the ./configure switches for the phpinfo page. Luckily for this case, the person who had originally compiled PHP had kept the installation source files and they put all of the supporting libraries in the same place – the Apache server root. Each of the –prefix like directives in the PHP ./configure switches pointed to the exact same path – the Apache server root. So, all I did was copy the server root out of staging and compiled everything using the same –prefix directive and viola, it worked. Not one ./configure or make install error. And the Apache startup error is now gone.
I found that there isn’t very good documentation online that describes the full end to end instructions all in one place other than in book form on Safari Books Online (http://safari.oreilly.com). The following book has a great explanation and it what gave me the confidence to continue and succeed in my quest to make this error go away upon Apache startup:
“Apache Phrasebook,” by Daniel Lopez; Jesus Blanco, Sams, May 25, 2006.
I know this post needs polishing.