A couple of possibilities.  I'd probably go for the second one.

1/ Define domain3 as an alias using the 'ServerAlias' directive within the
virtual host definition

2/ use mod_rewrite to redirect requests for short domain names to the
longer name.  This might be simpler if you have a lot of similarly
structured domain abreviations.  It would also encourage bookmarking and
sharing the canonical form of the URL which is generally a good idea.

Andrew McNaughton

------------------------------------------------------------------
Andrew McNaughton                   In Sydney and looking for work
[EMAIL PROTECTED]          http://staff.scoop.co.nz/andrew/cv.doc
Mobile: +61 422 753 792



On Tue, 18 Feb 2003, Matt Hyne wrote:

> Date: Tue, 18 Feb 2003 14:33:35 +1100
> From: Matt Hyne <[EMAIL PROTECTED]>
> To: slug <[EMAIL PROTECTED]>
> Subject: [SLUG] Problems with virtual hosts on apache.
>
>
> Folks, I have an apache problem that is probably quite simple to fix but
> I cannot find the solution.
>
> I have set up several virtual hosts on the box and these work fine,
> however I cannot get the correct virtualhost page if I drop the
> domainname from the URL.
>
> Eg (these are examples, so don't try accessing them):
>
> I have the following virtual domains:
>
> http://domain1.hyne.com
> http://domain2.hyne.com
> http://domain3.hyne.com
>
> Now, If I use the FQDN, I get the correct pages.  However if I just use
> http://domain2 or http://domain3 then I will always get the webpage for
> domain1.
>
> I've played around with the options and searched google to no avail.
>
> Anyone got an ideas ?
>
> Matt
>
> --
> SLUG - Sydney Linux User's Group - http://slug.org.au/
> More Info: http://lists.slug.org.au/listinfo/slug
>




-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to