I got a little problem setting up subdomain in apache... on my domain registrar (namecheap) I set up CNAME for my subdomain to be : forum.mydomain.com. In my apache config file ("default") I put : NameVirtualHost * <VirtualHost *> ServerAdmin ServerName forum.mydomain.com DocumentRoot /var/www/sforum/ <Directory /var/www/sforum/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> </VirtualHost> <VirtualHost *> ServerAdmin ServerName mydomain.com ServerAlias www.mydomain.com DocumentRoot /var/www/ <Directory /> Options FollowSymLinks AllowOverride All </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ErrorLog /var/log/apache2/error.log CustomLog /var/log/apache2/access.log cplus ServerSignature On </VirtualHost> the thing is when I go to forum.mydomain.com it redirects me to www.mydomain.com any ideas how to make it work? Thanks in advance.
I think you might want an A name, and it looks like you have wildcard dns enabled, which you dont want. Also, don't use the * in the vhost directive.