I'm trying to add a second virtual host to my apache configuration, but cannot seem to get the new virtual host to be used.
My httpd.conf just contains the following line:
ServerName radiofreebrighton.org.uk
I also have a ports.conf file, which contains the following:
NameVirtualHost *:80
Listen 80
<IfModule mod_ssl.c>
    Listen 443
</IfModule>
I have two files in sites-available which were symlinked to sites-enabled by a2ensite:
- radiofreebrighton.org.uk
- trafalgararches.co.uk
The contents of the first is:
<VirtualHost _default_:80>
    DocumentRoot /home/tom/www
    ServerAdmin tom@radiofreebrighton.org.uk
    ServerName radiofreebrighton.org.uk
    ServerAlias www.radiofreebrighton.org.uk
    <Directory /home/tom/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
    </Directory>
    ErrorLog /var/log/apache2/error.log
    LogLevel error
    CustomLog /var/log/apache2/access.log combined
    Alias /wiki /home/tom/www/mediawiki/index.php
</VirtualHost>
The contents of the latter is:
<VirtualHost *:80>
    DocumentRoot /home/tom/tata-www
    ServerAdmin admin@trafalgararches.co.uk
    ServerName trafalgararches.co.uk
    ServerAlias www.trafalgararches.co.uk
    <Directory /home/tom/tata-www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
    </Directory>
    logLevel error
    ErrorLog /var/log/apache2/error.log
</VirtualHost>
But any time I request a page from trafalgararches.co.uk, I am given a page from radiofreebrighton.org.uk. Why might this be happening? How can I fix it?
Edit:
Virtual host configuration as understood by apache:
tom@rfb:/usr/local$ apache2ctl -S
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80                   is a NameVirtualHost
         default server radiofreebrighton.org.uk (/etc/apache2/sites-enabled/radiofreebrighton.org.uk:1)
         port 80 namevhost radiofreebrighton.org.uk (/etc/apache2/sites-enabled/radiofreebrighton.org.uk:1)
         port 80 namevhost trafalgararches.co.uk (/etc/apache2/sites-enabled/trafalgararches.co.uk:1)
Syntax OK
(Gleaned via apache2ctl -S aka httpd -S.)
 
     
     
     
     
     
     
     
     
     
     
    