I am trying to create a site for the outlook and thunderbird autoconfiguration, in both cases they are using a specific subdomain to pull the configuration xml.
You need to create the following entries in you dns
autodiscover.example.com
autoconfig.example.com
Then in apache, you have to create a virtualhost in port 80 and another one in port 443 (outlook only uses https)
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName autodiscover.example.com
ServerAlias autoconfig.example.com autodiscover.* autoconfig.*
DocumentRoot /var/www/mail_discover
<Directory /var/www/mail_discover>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
NOTE: that you can only use wildcards in the ServerAlias entry, not in the ServerName (apache.org)