I am running an Ubuntu 12.04 Server-based Apache2 server with SSL. I seem to have my configuration correct to achieve SSL connections over port 443, and at first, I did not even configure the server for ANY VirtualHost on port 80.
Now, I would like to configure the server to take any HTTP requests over port 80 and automatically redirect them my port 443 virtualhosts, 100% of the time.
The one tip I am currently attempting is to use a .htaccess file in every directory with the following rule:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
</IfModule>
What is the barebones VirtualHost *:80 necessary to achieve correct redirects to *:443?