install mod ssl on apache

I am going to give you the steps to install mod_ssl on an Apache server by compiling the source.
Download the following packages
1. apache_1.3.14.tar.gz   http://www.apache.org
2. openssl-0.9.6.tar.gz http://www.openssl.org
3.  mod_ssl-2.7.1-1.3.14.tar.gz http://www.modssl.org
I have created a folder called  /downloads/src and downloaded all packages here
Go to Apache source files and  compile it as shown below
# ./configure –enable-module=so –enable-module=ssl –enable-module=mod_rewrite
Youc an add whatever module you needed
Now go to openssl folder and compile and install ( you can do this same by  using yum or apt-get command)
To compile and install OpenSSL do the following commands
# sh config -fPIC
# make
# make install
At this time you can compile your PHP also. To do that run following commands
# ./configure –with-apache=../apache_1.3.41  –with-gd –with-zlib-dir –with-jpeg-dir –with-png-dir –with-freetype-dir –enable-gd-native-ttf –with-freetype-dir=/usr/lib/ –with-ttf –with-mysql=/usr/local/mysql –with-curl –disable-soap –with-openssl –with-xmlrpc –enable-ftp –with-xsl –with-mysqli=/usr/local/mysql/bin/mysql_config
# make
# make install
Compile Apache and install
Go to the apache Directory and runn following commands
#  ./config.status
#  make
#  make certificate  ( This step will be asked  some inputs  from you for your self signed SSL certificate)
# $ make install
Now you have installed the apache server with a self signed SSL certificate. Now it is the time to add the location of the .CRT file and .KEY file in your apache configuration file.  From the above steps you can see the location of these files. Copy those paths.
Now open your httpd.conf file and  add the following line
Listen 443
Now create a virtual directory which will listen the port 443
<VirtualHost XXX.XXX.XXX.XXX:443>
ServerName  www.example.com
SSLEngine on
SSLCertificateFile  /usr/local/apache/conf/ssl.crt/server.crt
SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
</VirtualHost>
Now save the file and restart your Apache server
# apachectl stop
# apachectl startssl
Enjoy :)
You can leave a response, or trackback from your own site.

One Response to “install mod ssl on apache”

  1. Hi, i must say fantastic site you have, i stumbled across it in Bing. Does you get much traffic?

Leave a Reply

Subscribe without commenting


Fatal error: Call to undefined function wp_list_addonn() in /home/sites/customers/aneesh/systemadmin/blog/wp-content/themes/Grante/sidebar.php on line 106