Enable ssl site

sudo a2ensite ssl

Enable ssl, rewrite mod

sudo a2enmod rewrite
sudo a2enmod ssl

Add rewrite commands in /etc/apache2/sites-enabled/000-default, redirecting all connections on port 80 to https

RewriteEngine   on
RewriteCond     %{SERVER_PORT} ^80$
RewriteRule     ^(.*)$ https://%{SERVER_NAME}$1 [L,R]

Restart Apache

sudo service apache2 restart