mod_perl is often used with other components that plug into Apache,
such as PHP and SSL. In this section, we'll show you
a build combining mod_perl with PHP. We'll also show
how to build a secure version of Apache with mod_perl support using
each of the SSL options available for Apache today (mod_ssl,
Apache-SSL, Stronghold, and Covalent).
Since you now understand how the build process works,
we'll present these scenarios without much
explanation (unless they involve something we
haven't discussed yet).
All these scenarios were tested on a Linux platform. You might need
to refer to the specific component's documentation
if something doesn't work for you as described here.
The intention of this section is not to show you how to install other
non-mod_perl components alone, but how to do this in a bundle with
mod_perl.
Also, notice that the links we've used are very
likely to have changed by the time you read this document.
That's why we have used the
x.xx convention instead of using hardcoded
version numbers. Remember to replace the x.xx
placeholders with the version numbers of the distributions you are
going to use. To find out the latest stable version number, visit the
components' sites—e.g., if we say
https://perl.apache.org/dist/mod_perl-1.xx.tar.gz,
go to https://perl.apache.org/download/ to learn the
version number of the latest stable release of mod_perl 1, and
download the appropriate file.
Unless otherwise noted, all the components install themselves into a
default location. When you run make install, the
installation program tells you where it's going to
install the files.
you should see something like this in
/usr/local/apache/logs/error_log:
[Fri May 18 11:10:31 2001] [notice]
Apache/1.3.24 (Unix) mod_perl/1.26 mod_ssl/2.8.8
OpenSSL/0.9.6c configured -- resuming normal operations
If you used the default configuration, the SSL part
won't be loaded if you use apachectl
start and not apachectl startssl.
This scenario also demonstrates the fact that some third-party Apache
modules can be added to Apache by just enabling them (as with
mod_ssl), while others need to be separately configured and built (as
with mod_perl and PHP).
panic% tar xvzf mod_perl-1.xx
panic% tar xvzf apache_1.3.xx.tar.gz
panic% tar xvzf openssl-x.x.x.tar.gz
Configure and install openssl, if necessary:
panic% cd openssl-x.x.x
panic% ./config
panic% make && make test
panic# make install
If you already have the openssl development
environment installed, you can skip this stage.
Apache-SSL comes as a patch to Apache sources. First unpack the
Apache-SSL sources inside the Apache source tree and make sure that
the Apache source is clean (in case you've used this
source to build Apache before). Then run
./FixPatch and answer y to
proceed with the patching of Apache sources:
panic% cd apache_1.3.xx
panic% make clean
panic% tar xzvf ../apache_1.3.xx+ssl_x.xx.tar.gz
panic% ./FixPatch
Do you want me to apply the fixed-up Apache-SSL patch for you? [n] y
Proceed with mod_perl configuration. The notable addition to the
usual configuration parameters is that we use the
SSL_BASE parameter to point to the directory in
which openssl is installed:
Before running make test, add your
StrongholdKey to
t/conf/httpd.conf. If you are configuring by
hand, be sure to edit src/modules/perl/Makefile
and uncomment the #APACHE_SSL directive.
Test and install mod_perl:
panic% make test
panic# make install
Install Stronghold:
panic# cd /usr/local/stronghold
panic# make install