Recipe 2.8 Installing mod_ssl


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



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 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 


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

See Also

  • Recipe 7.2


Apache Cookbook
Apache Cookbook: Solutions and Examples for Apache Administrators
ISBN: 0596529945
EAN: 2147483647
Year: 2006
Pages: 215

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: