Building and installing apache


Copyright 2002, 2003 Andy Barclay
OpenContent License (OPL)

**** See below for apache 2 ****

Apache 1.3.12
=============

download perl pkg from smc.vnet.net
download apache from www.apache.org and extract it in SRCDIR
download openssl from www.openssl.org and extract it in SRCDIR
download mod_ssl from www.modssl.org and extract it in SRCDIR
install perl 5
	pkgadd -d perl*
build openssl
	-follow instructions for building in building.openssl.txt
apply mod_ssl "patches" to apache source
	ushqseng12/src/mod_ssl-2.6.2$ ./configure --with-apache=../apache_1.3.12
	ushqseng12/src/mod_ssl-2.6.2$ cd ../apache*12
build apache
	ushqseng12/src/apache1.3.12$ SSL_BASE=/usr/local/ssl
	ushqseng12/src/apache1.3.12$ export SSL_BASE
	ushqseng12/src/apache1.3.12$ ./configure \
		--enable-module=ssl \
		--enable-shared=ssl \
		--disable-rule=SSL_COMPAT \
		--enable-rule=SSL_SDBM
	ushqseng12/src/apache1.3.12$ make
	ushqseng12/src/apache1.3.12# make install
edit the config file and start apache in NON-SSL mode on port 8080
	ushqseng12/# cd /usr/local/apache/bin
	ushqseng12/# httpd -f /tmp/httpd.conf
try to contact the server on port 8080 using a browser
generate a certificate using openssl
	ushqseng12/# openssl genrsa -des3 \
		-rand /etc/hosts:/tmp/junk.tar -out acuent.corio.com.key 1024
generate a certificate request
	ushqseng12/# openssl req -new -key acuent.corio.com.key \
		-out acuent.corio.com.csr 
generate a self-signed certificate for testing
	ushqseng12/# openssl x509 -req -days 30 -in acuent.corio.com.csr
		-signkey acuent.corio.com.key -out acuent.corio.com.crt 
update the httpd.conf to look at these new keys/certs
	SSLCertificateFile /tmp/acuent.corio.com.crt
	SSLCertificateKeyFile /tmp/acuent.corio.com.key
stop and start apache in SSL mode on port 8443
	ushqseng12/# cd /usr/local/apache/bin
	ushqseng12/# httpd -DSSL -f /tmp/httpd.conf
try to contact the server on port 8443 using a browser
collect the following documents to be faxed to Thawte for a real certificate
	-certificate of incorporation OR Dunn and Bradstreet #
	-output of whois for corio.com
	-letter of authorization on corio letterhead
		this letter is generated automatically when you fill out the form
		requesting the certificate at: https://www.thawte.com/cgi/server/step1.exe

Apache 2.0.36/2.0.39/2.0.43
===========================
-Download openssl from openssl.org
	-compile and install following instructions in building.openssl.txt
	-build into a package, UPossl
-Download httpd-2.0.43 from apache.org
	-configure using:
	./configure --prefix=/usr/local/apache \
		--enable-module=most \
        	--enable-ssl \
        	--enable-shared=max \
		--enable-threads
	make
	sudo make install
	-build into a package, UPapche

NOTE: was getting a bunch of error messages in the error_log:
[warn] (128)Network is unreachable: connect to listener
	Need to use "--disable-ipv6" configure option

Apache 2.0.45 / 2.0.47 / 2.0.48
===============================
-Download openssl from openssl.org
   -compile and install following instructions in building.openssl.txt
   -build into a package, UPossl
-Download httpd-2.0.48 from apache.org
   -configure using:
   ./configure \
         --enable-so \
         --enable-ssl
   make
   sudo make install

Apache 2.0.49
=============
NOTE: Clinton needed mod_proxy and I needed mod_rewrite
"all" doesn't seem to include proxy
   ./configure \
	--enable-modules=all \
	--enable-proxy
NOTE: may have also wanted to try --enable-mods-shared=all

Adding the php4 module
======================
download and extract php-4.3.3
./configure --with-apxs2=/usr/local/apache2/bin/apxs
make
sudo make install