From LQWiki
This article describes how to secure your webpage running on apache2 with https. You create demo-certificates yourself for this. Find out your distribution, then proceed accordingly:
SUSE Linux
This article assumes you know about SSL, https and certificates.
- set up your Certification authority and create dummy-certificates
- get your SSL Configuration from the given template
- change your SSL Configuration
- restart apache2
- make sure you have content to show
- test your configuration
/usr/bin/gensslcert
cd /etc/apache2/vhosts.d cp vhost-ssl.template vhost-ssl.conf
have apache2 start per default with SSL. To do this, edit /etc/sysconfig/apache2: replace
APACHE_SERVER_FLAGS=""
with
APACHE_SERVER_FLAGS="SSL"
/etc/init.d/apache2 restart
echo "this is a test" >> /srv/www/htdocs/index.html
wget --no-check-certificate --no-proxy https://localhost
Ubuntu Linux
Follow https://help.ubuntu.com/8.04/serverguide/C/httpd.html. If you use name-based virtual hosts, your apache configuration will look like this afterwards:
<VirtualHost *:443> ServerName foo.org DocumentRoot /var/www/foo SSLEngine on SSLOptions +StrictRequire SSLCertificateFile /etc/ssl/certs/server.crt SSLCertificateKeyFile /etc/ssl/private/server.key </VirtualHost>

This page is available under a