# VHostHTTP for http only # VHostHTTPS for http & https w/ optional http to https redirect # only use one of the above at at time # VHostMAIL for webmail at mail. subdomain assumes/requires https w/ valid cert # VHostHTTP - HTTP on Port 80. Includes ServerAlias for .mylampsite.com subdomain ServerName $vhost ServerAlias www.$vhost ServerAlias $vhost.mylampsite.com DocumentRoot /srv/www/$vhost/html # VHostHTTPS - HTTPS on Port 443. Inludes Port 80 and ServerAliases for .mylampsite.com subdomain ServerName $vhost ServerAlias www.$vhost ServerAlias $vhost.mylampsite.com Redirect 301 "https://%{HTTP_HOST}%{REQUEST_URI}" ServerName $vhost ServerAlias www.$vhost ServerAlias $vhost.mylampsite.com DocumentRoot /srv/www/$vhost/html SSLCertificateFile /etc/ssl/letsencrypt/$vhost.pem # Webmail - HTTP Port 80 Redirects to HTTPS Port 443 ServerName mail.$vhost Redirect / https://mail.$vhost ServerName mail.$vhost DocumentRoot /srv/www/html/webmail/ SSLCertificateFile /etc/ssl/letsencrypt/mail.$vhost.pem