Web Servers

Configuring Apache with Open SSL

In this blog I will discuss the configuration of Apache Server with Open SSL. I am assuming both Apache Server and OpenSSL are installed on drive C.

Downloading Resources

1- Download Apache Server from the following location with SSL Support

http://mirror.cloudera.com/apache//httpd/binaries/win32/httpd-2.2.17-win32-x86-openssl-0.9.8o.msi

2- Down load OpenSSL from the following location:

http://www.thompsonbd.com/files/apache/Openssl-0.9.7e-Win32.zip

Installing Apache

Install Apcher Server with Default settings and make sure no other application is running on ports 80 and 443.

Installing OpenSSL

Unzip the file Openssl-0.9.7e-Win32.zip and copy the extracted folder on drive C and rename it a Openssl.

Certificate Generation

1- Navigate to Openssl folder using command line.

2- Execute the following:

  • openssl req -config openssl.cnf -new -out mycert.csr -keyout mycert.pem
  • openssl rsa -in mycert.pem -out mycert.key
  • openssl x509 -in mycert.csr -out mycert.cert -req -signkey mycert.key -days 365

Copy the .cert and .key files to C:\Program Files\Apache Software Foundation\Apache2.2\conf

Enable SSL on Apache

1- Open httpd.conf file available at C:\Program Files\Apache Software Foundation\Apache2.2\conf and uncomment the following lines by removing #:

  • #LoadModule ssl_module modules/mod_ssl.so
  • #Include conf/extra/httpd-ssl.conf

2- Open httpd-ssl.conf file available at  and enter certificate and key values as given below:

#   Server Certificate:

SSLCertificateFile “C:/Program Files/Apache Software Foundation/Apache2.2/conf/mycert.cert”

#   Server Private Key:

SSLCertificateKeyFile “C:/Program Files/Apache Software Foundation/Apache2.2/conf/mycert.key”

These are available under <VirtualHost localhost:443>.

3- Start Apache Server and access the url https://localhost. A page like below depending upon browser will we dispayed

4- Click I Understand the Risks and click Add Exception button.

5-Final click Confirm Security Exception button.

6- Default Apache Should be displayed

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s