httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Andersson" <rob...@profundis.nu>
Subject Re: [users@httpd] ServerAlias Syntax
Date Sat, 20 Sep 2003 00:42:24 GMT
Clint Davis wrote:
> I want to configure multiple domains to be directed to a single virtual
> host. Here are the domains:
>
> www.mydomain.com (my ServerName)
> www.mydomain.net
> www.mydomain.org
>
>
> Can I configure my virtual host directive like this to take care of all
the
> domains above?
>
> ServerAlias: *mydomain*

I will admit I'm not sure. I'd use:

    ServerAlias *.mydomain.* mydomain.*

Note, that this will not cause a redirect though, which is usually good so
there aren't different links all over the web actually pointing to the same
contents. To do that, simply do:

    <VirtualHost *>
        ServerName www.mydomain.com
        ...
    </VirtualHost>
    <VirtualHost *>
        ServerName something
        ServerAlias *.mydomain.* mydomain.*
        Redirect / http://www.mydomain.com
    </VirtualHost>

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message