I created a virtual host at my server to host multiple sites, but I got a few unexpected problems. One sites doesn't gets recognized by the server and is redirected to another domain on the server, another one just works without 'www' but the one with the 'www' gets also redirected to a different domain.
The code i use in vhost.conf is:
<VirtualHost *:80>
ServerName domain.com
#ServerAlias www.domain.com domain.com
DocumentRoot /var/www/vhosts/domain.com
#ServerAdmin mail@domain.com
<Directory /var/www/vhosts/domain.com>
AllowOverride All
</Directory>
It works fine on other domains on the same server. What did i do wrong and how can i fix it?
Thanks in advance!