[Gllug] VirtualHost on Apache 1.3.31 problem - solved

N.Pauli npauli at st-johns.org.uk
Fri Mar 18 16:12:00 UTC 2005


On Fri, 18 Mar, Richard Turner wrote:
> On Fri, 2005-03-18 at 14:32 +0000, N.Pauli wrote:
> > Dear All,
> > 
> > This one has got me completely going around in circles. I'm trying to
> > set up VirtualHosts on the Apache 1.3.31 server on my workstation.
> > Browsing to http://localhost brings up the page I've left there but
> > http://localhost/sjweb/ gives me 404 Not Found. I've had this working
> > before on Apache 1.3.x using this configuration.
> > 
> > NameVirtualHost localhost
> > <VirtualHost localhost>
> > 	ServerAlias	localhost
> > 	DocumentRoot	/var/www
> > </VirtualHost>
> > <VirtualHost localhost>
> > 	ServerAlias	sjweb
> > 	ServerName	sjweb
> > 	DocumentRoot	/home/nbp/Web/SJweb
> > 	ErrorLog	/home/nbp/Web/SJweb/logs/error_log
> > </VirtualHost>
> 
> Um, if http://localhost -> /var/www then http://localhost/sjweb -
> > /var/www/sjweb, hence 404.
> 
> Configure DNS so that 'sjweb' is an alias to your workstation and this
> config will work when you try http://sjweb/ (at least, I think it will,
> I'm no expert!)
> 
> Presumably you could set a symlink from /var/www/sjweb -
> > /home/npb/Web/SJWeb too, never tried. You'll have to make sure all the
> filesystem permissions are set correctly, but you'll know when that's
> the problem because you'll start seeing 'Permission Denied' instead of
> 'Not Found'.
> 
> Cheers,
> 
> Richard.
> 

Thanks, Richard. In fact both work very nicely. Just as I thought it was something horribly obvious that I was overlooking - I hadn't added sjweb to /etc/hosts as an alias for localhosts.

Yours,
Nigel

-- 
Nigel Pauli
Network Manager
St. John's School, Northwood





-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list