Installing Apache with SSL Support

1. Download Apache from the URL http://www.apache.org/ as per project requirement

2. Extract the Downloaded tar to some temporary folder.

3. Change directory to extracted directory
4. Run the command:

[root@web /]#./configure --prefix=/opt/ --enable-so --enable-proxy --enable-ssl --enable-setenvif --enable-modules=all

[root@web /]# make

[root@web /]# make install

5. Add the lines in /opt/apache2/conf/httpd.conf file to configure virtual hosts.

6. Here two virtual hosts are configured, one is on port 80 and another on port 81.

ServerName webbuild
ProxyPass / http://webbuild:8080/
ProxyPreserveHost on

ServerName webbuild
ProxyPass / http://webbuild:8080/
ProxyPreserveHost on

7. Start the apache web server

[root@web /]# /opt/apache2/bin/apachectl start

8. To stop the apache web server use the command below.

[root@web /]# /opt/apache2/bin/apachectl stop

3 Configuration Changes for SSL to work

1. Edit ‘httpd.conf’ file to include the ‘httpd-ssl.conf’ file.

Include conf/extra/httpd-ssl.conf

2. In ‘httpd-ssl.conf’ file uncomment and edit the path for the ‘SSL Certificate’ file and ‘SSL Certificate Key’ file.

SSLCertificateFile "/opt/apachewithssl/conf/ssl.crt/ssl.crt"

SSLCertificateKeyFile "/opt/apachewithssl/conf/ssl.key/ssl.key"

3. Check the SSL Implementation by pointing the web browser to https://

1 comment:

  1. I have just purchased an Apache SSL certificate and have consulted a friend about installing this through Linux and he pointed me to this post. Thanks a lot. I'll let you know how I get on when I've installed the SSL.