How to configure OpenSSL over apache on Ubuntu

How to configure OpenSSL over apache on Ubuntu

Setting up OpenSSL with Ubuntu 12.04 over the apache.

First, log on to your server and install Apache:

$sudo apt-get install apache2

Now, install and enable SSL module:

$sudo a2enmod ssl

$sudo /etc/init.d/apache2 reload

Creation a directory on this location

$mkdir /etc/apache2/ssl

$cd /etc/apache2/ssl

Run these following commands

$openssl genrsa -des3 -out server.key 1024
$openssl req -new -key server.key -out server.csr
$openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
$chmod 0400 /etc/apache2/ssl/server.key
$chmod 0400 /etc/apache2/ssl/server.crt
$cp /etc/apache2/ssl/server.key server.key.orig
$openssl rsa -in server.key.orig -out server.key
$chmod 400 /etc/apache2/ssl/*

 
Find and edit the RED TEXT.

vi /etc/apache2/sites-available/default-ssl
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key

Restart WebServer

$/etc/init.d/apache2 restart

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.