You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Peter Callaghan <pc...@mergitech.com> on 2002/08/01 15:27:04 UTC

Virtual Hosting with Wildcards

Hello, I am running Apache 1.3.26 on Slackware 8.0.  We are a hosting
company that currently has around 50 sites.  As one of the services, we
offer our client access to webmail for each domain, normally
"webmail.theirdomain.com".  The problem that I am having is that I want to
be able to set up an address for the webmail without having to include each
domain in the VirtualHost section as a ServerAlias.

I have attempted to set the default location to be the webmail, so that any
unresolved vhost will hit that.  Unfortunately, this works for the server
name and the IP address but not for unresolved names.

I am aware that you are able to user wildcards as in *.yourdomain.com but I
would like to be able to do something like webmail.* so that
webmail.anything would be resolved to the proper page.

Can anyone make a suggestion as to how I might get this working?

Thanks,
    P Callaghan

Re: Virtual Hosting with Wildcards

Posted by Rich Bowen <rb...@rcbowen.com>.
On Thu, 1 Aug 2002, Peter Callaghan wrote:

> Hello, I am running Apache 1.3.26 on Slackware 8.0.  We are a hosting
> company that currently has around 50 sites.  As one of the services, we
> offer our client access to webmail for each domain, normally
> "webmail.theirdomain.com".  The problem that I am having is that I want to
> be able to set up an address for the webmail without having to include each
> domain in the VirtualHost section as a ServerAlias.
>
> I have attempted to set the default location to be the webmail, so that any
> unresolved vhost will hit that.  Unfortunately, this works for the server
> name and the IP address but not for unresolved names.
>
> I am aware that you are able to user wildcards as in *.yourdomain.com but I
> would like to be able to do something like webmail.* so that
> webmail.anything would be resolved to the proper page.
>
> Can anyone make a suggestion as to how I might get this working?

You might want to look at mod_vhost_alias as a possible solution.
Failing that, this looks like a job for mod_rewrite. There is an example
of using mod_rewrite for vhost stuff, in the vhost docs
(http://httpd.apache.org/docs/vhosts/) which does something similar.

-- 
Rich Bowen - rbowen@apache.org
http://www.amazon.com/exec/obidos/registry/3GDC3KN82W4AO


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org