subdomains
Patrick Ben Koetter
p at state-of-mind.de
Wed Apr 11 16:21:16 CEST 2012
Hi Marc,
* Marc Patermann <hans.moser at ofd-z.niedersachsen.de>:
> I have a lot of subdomains.
I know you have many. :)
> As far as I understand I need to have an autoconfig entry in DNS for
> every subdomain.
>
Before I begin:
Mozilla Schema == autoconfig...
Microsoft Schema == autodiscover...
> autoconfig.foo.example.com. IN A 192.168.2.1
For TB you need an either an A Record in your subdomain OR a CNAME.
> autodiscover.bar.example.com. IN A 192.168.2.1
For MS you need either an A Record OR you add a SRV record that redirects the
client to a single A Record. We definitely recommend using a SRV record because
it will safe you a lot of money when buying certificates - unless you use a
wildcard cert. Be aware though that when you redirect clients will issue a
notification which might irritate your customers.
> Do I really need to configure every subdomain in the virtualhost in
> Apache, too?
>
> <VirtualHost *:80>
>
> ServerName example.com
> ServerAlias autoconfig.foo.example.com
> ServerAlias autoconfig.bar.example.com
No. You can use a wildcard virtual host. The following example was taken from
<https://developer.mozilla.org/en/Thunderbird/Autoconfiguration>:
<VirtualHost *:80> #Must be the first Virtual host
ServerAdmin webmaster at ofd-z.niedersachsen.de
ServerName www
DocumentRoot /var/www
RewriteEngine On
RewriteCond %{HTTP_HOST} ^autoconfig\. [NC]
RewriteRule ^/(.*) http://autoconfig.ofd-z.niedersachsen.de/$1 [L,R=301,NE]
#...
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www/autoconfig/
ServerName autoconfig.ofd-z.niedersachsen.de
<Directory /var/www/autoconfig>
Order allow,deny
allow from all
</Directory>
</VirtualHost>
> I think the HTTP HOST header is not involved anyway, or is it?
> So if the webserver at IP 192.168.2.1 is solely for automx, there is
> no need for all the names, is it?
>From my - limited - understanding with webservers, yes. They will all hit the
default server and it will serve if it can.
HTH
p at rick
--
state of mind ()
Digitale Kommunikation
http://www.state-of-mind.de
Franziskanerstraße 15 Telefon +49 89 3090 4664
81669 München Telefax +49 89 3090 4666
Amtsgericht München Partnerschaftsregister PR 563
More information about the automx-users
mailing list