Sorry but I didn't know where to post this so I chose the installation board

I am running apache experimentally on my computer and I have a question for all of you that know about these things.
I have a public ip address and I have set up my dns entries to map abc.domain.com and def.domain.com to the same address. Now I want to redirect the content of abc.domain.com to a specific document folder, while the def.domain.com to another.
I read in my book that I can do this using virtualhost. The examples though presented are using different IP addresses. Hence the book has:
<VirtualHost 192.168.2.100>
ServerAdmin []
[email protected][/]
DocumentRoot c:/www/htdocs/abc
ServerName abc.domain.com
</VirtualHost>
<VirtualHost 192.168.2.101>
ServerAdmin []
[email protected][/]
DocumentRoot c:/www/htdocs/def
ServerName def.domain.com
</VirtualHost>
What I want to do is distinguish them differently. Since I have one IP address, I want to do something like this:
<VirtualHost abc.domain.com >
ServerAdmin []
[email protected][/]
DocumentRoot c:/www/htdocs/abc
ServerName abc.domain.com
</VirtualHost>
<VirtualHost def.domain.com>
ServerAdmin []
[email protected][/]
DocumentRoot c:/www/htdocs/def
ServerName def.domain.com
</VirtualHost>
With IIS you could do this by editing the Header information in the particular website.
Finally I want to achieve that everyone that wants to go to
www.domain.com can be redirected if he/she types domain.com (without the www). (My dns entries show the same ip address with or without the www)
Thanks in advance.
Warm regards
Nikos