I am not exactly sure what I am doing wrong. I have been able to get subdomains to work on my server, running Ubuntu 10.04 Server. I am running like a Ubuntu recommends with the VirtualHost information in the sites-available/ folder. It was confusing at first how it worked, but after playing with it for over 8 hours things are making more sense.
My biggest problem I feel is I am missing something basic. I just don't know what it is. Here are my virtual host files.
<VirtualHost *:80> ServerName percent20.net ServerAlias www.percent20.net DocumentRoot /srv/www/percent20.net/public_html </VirtualHost>
<VirtualHost *:80> ServerName languagesamurai.com ServerAlias www.languagesamurai.com DocumentRoot /srv/www/languagesamurai/ </VirtualHost>
The current problem I come up against is if I am trying to add a domain that isn't a subdomain it shows what is should be on net.percent20.net. However, net.percent20.net works too.
This is a real confusing problem and lack of knowledge about Apache on my part is a real hamper.
Any ideas would be greatly appreciated. If more information is needed I can provide that too.