Mehrere Domains auf einem Apache-Server

durch diese Konfiguration kann man domain1.de und domain2.de mit einem Apachen und einer IP ausliefern.

<VirtualHost *:80>
    DocumentRoot "/var/www/domain1"
    ServerName domain1.de   
    ServerAlias *.domain1.de
</VirtualHost>
<VirtualHost *:80>
    DocumentRoot "/var/www/domain2"
    ServerName domain2.de   
    ServerAlias *.domain2.de
</VirtualHost>

"The asterisks match all addresses, so the main server serves no requests. Due to the fact that www.example1.com is first in the configuration file, it has the highest priority and can be seen as the default or primary server. That means that if a request is received that does not match one of the specified ServerName directives, it will be served by this first VirtualHost."

von http://httpd.apache.org/docs/2.0/vhosts/examples.html