Okey, how does this look?
000-domain:
NameVirtualHost xxx.xxx.xxx.xxx
<VirtualHost xxx.xxx.xxx.xxx>
ServerAdmin webmaster@domain.com
ServerName www.domain.com
ServerAlias *.domain.com domain.com
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://www.domain.com/$1 [L,R]
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
</VirtualHost>
001-domain1:
<VirtualHost xxx.xxx.xxx.xxx>
ServerAdmin webmaster@domain1.com
ServerName www.domain1.com
ServerAlias pop.domain1.com smtp.domain1.com domain1.com
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.domain1\.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://www.domain1.com/$1 [L,R]
DocumentRoot /var/www/domain1
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/domain1>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order deny,allow
Allow from all
</Directory>
ErrorLog /var/log/apache2/domain1-error.log
LogLevel warn
CustomLog /var/log/apache2/domain1-access.log combined
ServerSignature On
</VirtualHost>
002-domain2:
<VirtualHost xxx.xxx.xxx.xxx>
ServerAdmin webmaster@domain2.com
ServerName www.domain2.com
ServerAlias pop.domain2.com smtp.domain2.com domain2.com
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.domain2\.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://www.domain2.com/$1 [L,R]
DocumentRoot /var/www/domain2
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/domain2>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order deny,allow
Allow from all
</Directory>
ErrorLog /var/log/apache2/domain2-error.log
LogLevel warn
CustomLog /var/log/apache2/domain2-access.log combined
ServerSignature On
</VirtualHost>
Simo