vmail-stack/etc/apache2/conf-available/vmail_macro.conf

21 lines
578 B
Plaintext
Raw Normal View History

2021-03-31 11:00:02 -07:00
# 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>