Install Apache-Httpd with SSL

About OpenSSL

OpenSSL should already be installed on your system (e.g. /usr/bin/openssl version), because it is used by OpenSSH (/usr/bin/ssh -version), but in case it isn't, then do the following steps

  • Download Open-SSL version 1.0.1a or higher
  • Build Open-SSL
    • ./config
    • make (NOTE: You might have to install gcc first)
    • sudo make install (will install at /usr/local/ssl by default, see INSTALL file for more details)
  • Test Open-SSL installation by typing "/usr/local/ssl/bin/openssl version". As a response one should receive something like "OpenSSL 1.0.1a 19 Apr 2012"

Installing Apache httpd

  • Download Apache-Httpd version 2.2.3 or higher
  • Build Apache-Httpd with SSL
    • ./configure --prefix=/usr/local/httpd-2.2.3 --enable-ssl=shared --with-ssl=/usr/local/ssl --enable-proxy --enable-proxy-http
    • make
    • sudo make install (will install at /usr/local/httpd-2.2.3)
  • Create SSL-Key
    • openssl genrsa 1024 > /usr/local/httpd-2.2.3/conf/server.key
    • openssl req -new -x509 -nodes -sha1 -days 365 -key /usr/local/httpd-2.2.3/conf/server.key > /usr/local/httpd-2.2.3/conf/server.crt
  • Uncomment SSL config within /usr/local/httpd-2.2.3/conf/httpd.conf (Include conf/extra/httpd-ssl.conf)
  • Configure virtual hosts within /usr/local/httpd-2.2.3/conf/extra/httpd-vhosts.conf
  • Uncomment vhosts config within /usr/local/httpd-2.2.3/conf/httpd.conf (Include conf/extra/httpd-vhosts.conf)
  • Startup Apache: /usr/local/httpd-2.2.3/bin/apachectl start
  • Test SSL:

Httpd and Tomcat with SSL:

Httpd with SSL only:

Your comments are much appreciated

Is the content of this page unclear or you think it could be improved? Please add a comment and we will try to improve it accordingly.