Ubuntu 11.10: 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:

  • /etc/ssl/private/ssl-cert-snakeoil.key
  • /etc/ssl/certs/ssl-cert-snakeoil.pem

Activate Apache SSL module:

$ a2enmod ssl

Activate Apache default ssl virtual host:

$ a2ensite default-ssl

Restart Apache:

/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.

Trackback/Pingback (1)

  1. problems with https Ubuntu 11.10 on Monday, February 13, 2012 at 12:02 pm

    [...] Hello! I've got problem with setting up https on Ubuntu 11.10. I followed procedure presented at: http://charles.lescampeurs.org/2012/…ed-certificate When I restart apache2 I get, only, warnings that the server cannot resolve name. But port 80 [...]