[Nottingham] Two steps forward...

Robert Ross rross at dmu.ac.uk
Tue Feb 8 12:10:34 GMT 2005


Hi everyone,

Well last week got the PHP working on my new development server (Suse 9 pro)
and began to look at setting up some virtual hosts.  I have done this before
and on the current (Yellow Dog) server, they are working fine.  However,
after a really frustrating week I have failed (miserably).

Some background stuff:
Within httpd.conf I have enlivened the 'NameVirtualHost' line and it is
listening on port 80.  On the Suse setup using Apache2 the 'vhosts' are
within an includes files - vhosts.d  Within this file are the <VirtualHost>
containers with the virtual host details and the file is called from a line
within the virtual hosts section of httpd.conf

I have changed the httpd.conf line from 'NameVirtualHost *:80' to
'NameVirtualHost *' to 'NameVirtualHost <IP address>' to 'NameVirtualHost
<IP address>:80' and have changed the vhosts.d file to reflect the changes
so that there is no inconsistencies.  I then added in a <Virtual Host *>
with default settings, changing it to the other setting as well (just in
case a default host was needed).  No luck.  

I either get an error stating 'NameVirtualHost * has no VirtualHosts' or a
'VirtualHost overlap on port 80 , the first has precedence' - depending on
the use of *, *:80 or the IP address.  The only site I can see is the first
one within my vhosts.d file.  If I change the name of this site so that it
comes in second or third, then whatever site takes over the first spot is
then the only one I can see, even though I use the correct domain name of
another site (and it shows up in the address bar, so the DNS must be OK).  I
have put in an example of the <virtual host> file below:

<VirtualHost *>
ServerName joe.bloggs.org.uk
DocumentRoot /srv/www/htdocs/joebloggs
</VirtualHost>

<VirtualHost *>
ServerName another.joe.bloggs.org.uk
DocumentRoot /srv/www/htdocs/anojoebloggs
</VirtualHost>


And so on.  I did have document tags in there, but have taken them out for
simplicity sake (and to narrow down the number of variables that could be
causing the problem).  

I also have a tomcat server running on 8080 successfully (well I can see it)
and a Content Management System attached to it. 

Anyone have any ideas 'cos I'm fresh out.

TIA

Robb





More information about the Nottingham mailing list