SSL (https)をubuntu 14.04で有効化

以下のコマンドを実行。
openssl req -new -x509 -days 365 -nodes -out apache.pem -keyout apache.key

そして、生成ファイルを/etc/ssl/の適切な位置に配置し、/etc/apache2/sites-enabled/default-ssl.confに以下の記述を追加。

SSLCertificateFile    /etc/ssl/certs/apache.pem
SSLCertificateKeyFile /etc/ssl/private/apache.key

Djangoを使用するなら、例えば以下のような記述も/etc/apache2/sites-enabled/default-ssl.confにコピーする必要あり。

Alias /MySystem_static/ /home/taro/MyDjangoSystem/static/

<Directory /home/taro/MyDjangoSystem/static/>
Require all granted
</Directory>

WSGIScriptAlias /MySystem /home/taro/MyDjangoSystem/MyDjangoSystem/django.wsgi

<Directory /home/taro/MyDjangoSystem/MyDjangoSystem>
<Files django.wsgi>
Require all granted
</Files>
</Directory>