1) Download Apache to the server:
cd /usr/local/
wget http://www.apache.org/dist/httpd/apache_1.3.33.tar.gz
tar -zxvf apache_1.3.33.tar.gz

2) Download and install Mod_SSL on the server:
wget http://www.modssl.org/source/mod_ssl-2.8.22-1.3.33.tar.gz
tar -zxvf mod_ssl-2.8.22-1.3.33.tar.gz
cd mod_ssl-2.8.22-1.3.33
./configure --with-apache=../apache_1.3.33
vi /etc/ld.so.conf
Add /usr/local/ssl/lib and /usr/local/lib there
ldconfig

3) Install Apache:

cd ../apache_1.3.33
EAPI_MM="/usr/local/mm-1.3.0" SSL_BASE="/usr/local/ssl" ./configure --enable-module=unique_id --enable-module=rewrite --enable-module=speling --enable-module=expires --enable-module=info --enable-module=log_agent --enable-module=log_referer --enable-module=usertrack --enable-module=proxy --enable-module=userdir --enable-module=so --enable-shared=ssl --enable-module=ssl
make
make install


Note: If the above throws up an error about SSL_BASE, make sure openssl is installed on the server and give the path to openssl source for SSL_BASE= For example, SSL_BASE=/usr/local/src/openssl-0.9.7g

4) vi /etc/rc.d/init.d/httpd
change the /usr/sbin/apachectl and /usr/sbin/httpd entries to /usr/local/apache/bin/apachectl and /usr/local/apache/bin/httpd respectively
Add the virtual host entries to the new httpd.conf from /etc/httpd/conf/httpd.conf