Friday 22 August 2014

SSL Certificate on Ubuntu Server

Install SSL Certificate on Ubuntu Server

sudo apt-get install apache2
It works!

a2enmod ssl

service apache2 restart

mkdir /etc/apache2/ssl

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt

Country Name (2 letter code) [AU]:IN
State or Province Name (full name) [Some-State]:KA
Locality Name (eg, city) []:Bangalore
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Pearson
Organizational Unit Name (eg, section) []:Pearson
Common Name (e.g. server FQDN or YOUR name) []:
Email Address []

vi /etc/apache2/sites-available/default

<VirtualHost *:443>
        ServerAdmin webmaster@localhost
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/apache.key

Service apache2 restart


It will prompt for This Connection is Untrusted and follow, I Understand the Risks-Add Exception-On Add Security-Exception window-Confirm Security Exception

It works!


No comments:

Post a Comment