vmail-stack/etc/apache2/conf-available/vmail_macro.conf
Matthew Saunders Brown 3a9c8b7588 add vmail_macro
2021-03-31 11:00:02 -07:00

21 lines
578 B
Plaintext

# VMailHTTPS for roundcubemail webmail at mail. subdomain assumes & requires https w/ valid cert
# Webmail - HTTP Port 80 Redirects to HTTPS Port 443
<Macro VMailHTTPS $vhost>
<VirtualHost *:80>
ServerName $vhost
<Location "/">
<If "%{REQUEST_URI} !~ m#^/.well-known/acme-challenge/#">
Redirect / https://$vhost
</If>
</Location>
</VirtualHost>
<VirtualHost *:443>
ServerName $vhost
DocumentRoot /srv/www/html/roundcubemail/
SSLEngine on
SSLCertificateFile /etc/ssl/letsencrypt/$vhost.pem
</VirtualHost>
</Macro>