Currently I have only one website setup
(http:/startx.co.uk) and as
far as I can tell by looking at the /etc/apache2 settings I didn't
need to do anything much at the time I originally got it running.
I notice I have this file /var/www/index.php
<?php
header("Location:
http://startx.co.uk/Kingsclere")uot;);
exit;
?>
which presumably points to /var/www/Kingsclere which contains all
the files for the website (I should point out my memory is hopeless
these days and I cannot remember what I did when I set it it and
like most? people I didn't document setting up the VPS other than
listing the packages I installed on top of the basic etch system)
Now to the reason for writing, it looks likely that I will need to
add another website to the current apache2 setup.
A friend of mine needs to cease running a website which complements
my "Kingsclere Families". We don't want to lose all the historical
stuff which is on my friends site so I have offered to host the
website for him but want to keep the current name of his site so I
will have Kingsclere Families and Kingsclere History sites.
I browsed the web for instructions and ended up using this site
www.debian-administration.org/article/412/Hosting_multiple_websites_with_Ap…
it is a bit old but it mostly works on a test setup on my local
desktop machine and I can load the three test sites with the URL
http://localhost/sitename
However I get this error message:
benden:/home/jayell# apache2ctl -S
[Mon Feb 07 11:07:27 2011] [error] VirtualHost *:80 -- mixing *
ports and non-* ports with a NameVirtualHost address is not
supported, proceeding with undefined results [Mon Feb 07 11:07:27
2011] [warn] NameVirtualHost *:80 has no VirtualHosts VirtualHost
configuration: wildcard NameVirtualHosts and _default_ servers: *:*
is a NameVirtualHost
default server benden.pern
(/etc/apache2/sites-enabled/000-default:1)
port 80 namevhost benden.pern
(/etc/apache2/sites-enabled/000-default:1)
port * namevhost Kingsclere
(/etc/apache2/sites-enabled/Kingsclere:4)
port * namevhost KingsclereHistory
(/etc/apache2/sites-enabled/KingsclereHistory:4)
port * namevhost StartxLimited
(/etc/apache2/sites-enabled/StartxLimited:4)
Syntax OK
is the problem cased by having a default server which presumably was
setup automatically and based on the hostname. There is nothing
in /etc/apache2/sites-enabled/@000-default which refers to 'benden'
If I remove that file then I cannot access the other 3 vhosts
apologies for the long posting but I need to be sure of what I am
doing before I try doing anything on my VPS
Sounds to me like you're using
<VirtualHost *:80>
along with
<VirtualHost *>
statements in your config.
To find all those statements, do this:
cd /etc/apache2
grep VirtualHost */*