how to config virtual hosting
I created a local dns and setup foo.com as my domain.
Now, I want to setup mrtg.foo.com I created virtual hosting in my apache
Here is my apache config
ServerName 127.0.0.1
NameVirtualHost mrtg.foo.com
<VirtualHost mrtg.foo.com>
ServerAdmin root@localhost
DocumentRoot /var/www/html/mrtg
ServerName mrtg.foo.com
ErrorLog logs/foo-error_log
CustomLog logs/foo_com-access_log common
</VirtualHost>
Here is my zone file in my dns
foo.com. IN A 10.0.1.14
www IN A 10.0.1.14
mrtg IN A 10.0.1.14
The problem is the site mrtg.foo.com and foo.com display the same. Is there a problem in my apache and dns config file?