The first entry in httpd.conf is for the subdomain, The second for the main site.
If I leave my httpd.conf like that the subdomain works. But I cannot access my site using www.
In httpd.conf I have:
DocumentRoot /site1/home/mydomain/public_html/forums
ServerName forum.mydomain.com
ServerAlias forum.mydomain.com
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
ServerName mydomain.com
DocumentRoot /site1/home/mydomain/public_html
ServerAlias mydomain.com www.mydomain.com mydomain.net www.mydomain.net
CustomLog logs/mydomain.com combined
and in my dns I have this line for the subdomain:
forum.mydomain.com. 14400 IN A xxx.xxx.xxx.xxx
Can anyone see the problem here ?