aboutsummaryrefslogtreecommitdiffstats
path: root/roles/mailserver/templates/etc_apache2_sites-available_autoconfig.j2
blob: 1c3a07c8b4bf7935088c68d28354a4175ed37005 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# NOTE: We don't permanently redirect clients to the HTTPS address because some clients, like
# Thunderbird, dont't follow redirections to the HTTPS URL.
#
# Additionally, documentation doesn't say whether the XML file should be served over either HTTP,
# HTTPS or both, even though only the former is mentioned. Still, we allow clients to choose
# between HTTP and HTTPS transports.

<VirtualHost *:80>

    ServerName {{ mail_server_autoconfig_hostname }}

    DocumentRoot            "/var/www/autoconfig"
    Options                 -Indexes

    HostnameLookups         Off
</VirtualHost>

<VirtualHost *:443>
    ServerName {{ mail_server_autoconfig_hostname }}
    SSLEngine On

    DocumentRoot            "/var/www/autoconfig"
    Options                 -Indexes

    HostnameLookups         Off
</VirtualHost>