Mission
This page will explain step-by-step how to install Apache from scratch, with the following modules:
Note: For this page, I have used mod_perl 1.21, Apache 1.3.9, Open SSL 0.9.4, RSAref 2.0, mm 1.0.12 and mod_ssl 2.4.9 (the latest for each package as of December 08/99).
I mention this because I have used the full path names when describing the install. You version number may be different, so don't be puzzled...
This procedure has also worked with older versions of the packages (ie. Apache 1.3.6).
Compiling Each Module
Note: Each module will have to be compiled in order and this was rather messy to find out. You must do each package in order, as illustrated below:
Step 1: Building mod_perl
# cd /export/installs/apache/mod_perl-1.21 # perl Makefile.PL USE_APACI=1 EVERYTHING=1You must answer y to the first question - "Configure mod_perl with Apache?".
After answering these questions a the Makefile will configure itself for the make.
After this is done, simply type make followed by make install.
(You should confirm that mod_perl was installed by looking at the files in ../apache_1.3.9/src/modules/perl - you should see mod_perl.*)
Step 2: Building RSARef
To build Open SSL, you first need to build RSARef:
# cd /export/installs/apache/rsaref # cp -rp install/unix local # cd local # make # mv rsaref.a librsaref.aDo not make install.
# cd /export/installs/apache/openssl-0.9.4 # sh config -L`pwd`/../rsaref/local rsaref -fPIC # make # make testMake sure the test works. Do not make install.
# cd /export/installs/apache/mm-1.0.12 # ./configure --disable-shared # makeYou must keep the --disable-shared tag in the configure call. Do not make install.
# cd /export/installs/apache/mod_ssl-2.4.9-1.3.9 # ./configure --with-apache=../apache_1.3.9Do not make or make install.
Last Step: Building and Installing Apache
From the modules that you have built above, we can setup Apache. Go into the Apache source directory ( /export/installs/apache/apache_1.3.9)
Please Note: Firstly, the configure command for Apache should be put into a shell script file, so you can add more modules to Apache at a later time (and not accidenatly forgetting a module).
This is easier, as the next time you want to add a module, just open the shell script file and add the configuration line and re-run the configuration.
For configuring Apache with all the modules above (and mod_rewrite - which comes within the Apache source package), I did the following:
#!/bin/sh SSL_BASE=/export/installs/apache/openssl-0.9.4 RSA_BASE=/export/installs/apache/rsaref/local/ \ EAPI_MM=/export/installs/apache/mm-1.0.12 ./configure --enable-module=ssl --prefix=/usr/apache \ --activate-module=src/modules/perl/libperl.a --activate-module=src/modules/standard/mod_rewrite.o
This should run smoothly. If it doesn't, the configuration must have been wrong. Check all path names and compiler options.
If everything is fine, you will see the following after running ./default.config:
Configuring for Apache, Version 1.3.9 + using installation path layout: Apache (config.layout) + activated perl module (modules/perl/libperl.a) + activated rewrite module (modules/standard/mod_rewrite.o) Creating Makefile .....
apachectl
Within the /usr/apache/httpd-[site]/bin directory there will be a file called apachectl.
It is advised that you add/replace these lines to the configuration section:
ROOT=/usr/apache/httpd-[site] HTTPD="/usr/apache/httpd-[site]/bin/httpd -d $ROOT"
To activate SSL, replace the above line (starting with HTTPD=) with the following:
HTTPD="/usr/apache/httpd-[site]/bin/httpd -d $ROOT -DSSL"In the httpd.conf file, point the following variables to the right locations for the .key and .crt certificates:
SSLCertificateKeyFile /usr/apache/httpd-[site]/conf/server.key # public key SSLCertificateFile /usr/apache/httpd-[site]/conf/server.crt # key recieved from Thawte
Now check the error log..ie. tail -f /usr/apache/logs/error_log and you should see the following:
[notice] Apache/1.3.9 (Unix) mod_perl/1.21 mod_ssl/2.4.9 OpenSSL/0.9.4 configured -- resuming normal operations
Now point your browser to the server and you should see a friendly message from Apache and SSL confirming the installation.Afra Ahmad 1999