I have my own vps, and I want to add a subdomain to my domain. I figured this is something that apache can handle.
So I'm using someone else's DNS, which points requests of my domain to my server.
I haven't really done anything to mess with the 'stock' install of apache2.
I currently have this in my sites-enabled:
NameVirtualHost x.x.x.x:80 <VirtualHost x.x.x.x:80> ServerName www.domain.com ServerAlias domain.com DocumentRoot /var/www/domain AccessFileName .htaccess <Directory /var/www/domain> Options Indexes FollowSymLinks MultiViews AllowOverride all Order allow,deny allow from all </Directory> </VirtualHost>
I tried adding a second virtualhost with the same IP, and just changing any occurrence of domain.com to subdomain.domain.com, but I get an error upon restart saying that I have multiple virtualhosts with the same name or something.
I think there is a simple solution to this, and I have spent enough time trying to figure this out.