Ubuntu 12.04: setting up Apache2 and SSL with self-signed certificate

Create a self-signed certificate:

$ make-ssl-cert generate-default-snakeoil –force-overwrite

It creates the following files:



Activate Apache SSL module:

$ a2enmod ssl

Activate Apache default ssl virtual host:

$ a2ensite default-ssl

Restart Apache:

$ service apache2 restart

Alternativno /etc/init.d/apache2 restart

You should now see the following page on your webserver:

It works! This is the default web page for this server.The web server software is running but no content has been added, yet.

Leave a Reply