Попробуйте
<VirtualHost "site1.local">
ServerAdmin spam@a1230912##ad#.nl
DocumentRoot c:/xampp/htdocs/site1/trunk/
ServerName site1.local
</VirtualHost>
<VirtualHost "site2.local">
ServerAdmin spam@a1230912##ad#.nl
DocumentRoot c:/xampp/htdocs/site2/trunk/
ServerName site2.local
</VirtualHost>
Вы всегда получаете site1, потому что Apache по умолчанию первый.
редактировать
Раскоментируйте
#NameVirtualHost *
до
NameVirtualHost *
В вашем httpd.conf
Мой говорит (/etc/httpd/conf/httpd.conf)
126 # Listen: Allows you to bind Apache to specific IP addresses and/or
127 # ports, in addition to the default. See also the <VirtualHost>
128 # directive.
129 #
130 # Change this to Listen on specific IP addresses as shown below to
131 # prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
132 #
133 Listen 127.0.0.1:80
134 NameVirtualHost 127.0.0.1
И у моего файла vhost
<VirtualHost "www.whatever.com">
DocumentRoot /var/www/html/whatever/pub
ErrorLog logs/error_log
ServerName www.whatever.com
...