DekGenius.com
[ Team LiB ] Previous Section Next Section

Recipe 2.8 Installing mod_ssl

Problem

You want to add SSL support to your Apache server with the mod_ssl secure HTTP module.

Solution

Windows

At the time of this writing, there is no supported means of installing mod_ssl on Windows.

Apache 2.0

mod_ssl is included with 2.0, although it is not automatically compiled nor installed when you build from source. You need to include the —enable-ssl option on your ./configure line, and enable it with LoadModule and AddModule directives.

Apache 1.3

To install mod_ssl on a Unixish system, download the tarball package from the http://www.modssl.org/ web site and unpack it. Then:

% cd  mod_ssl-2.8.14-1.3.27 
% ./configure \ 
>    --with-apache=.. /apache_1.3.27 \ 
>    --with-ssl=SYSTEM \ 
>    --prefix= /usr/local/apache 
% cd ../apache_1.3.27 
% make 
% make certificate 

Discussion

The mod_ssl package requires source-level changes to the base Apache code, and so the version of the mod_ssl package you install must match the version of the Apache distribution you have. If your Apache installation doesn't include the source (such as if you installed a binary-only RPM or other vendor distribution), you won't be able to add mod_ssl to it.

In addition to the Apache source, mod_ssl requires that you have Perl and the OpenSSL libraries installed. The —with-ssl option on the build configuration statement indicates where this is located; if it is in a vendor distributed directory, the special keyword SYSTEM tells the build to look for it, and you don't have to find it yourself.

Unlike most other Apache modules, when adding mod_ssl you run the ./configure script that's in mod_ssl's directory rather than the one in the Apache source directory; the module's script makes changes to Apache's and then invokes it directly.

This recipe is the bare basics; there are many optional components and features that mod_ssl allows you to specify at configuration time. For more information, consult the README and INSTALL files in the mod_ssl source directory, or the mod_ssl web site at http://www.modssl.org/.

See Also

    [ Team LiB ] Previous Section Next Section