vhost_alias Q: how to define BOTH www, and, www-less names ? multi-domains to one vhost-alias

vhost_alias Q: how to define BOTH www, and, www-less names ? multi-domains to one vhost-alias

Post by Voytek Eymon » Tue, 06 Jun 2000 04:00:00



I'd like to setup Apache with vhost_alias support, AND, be able to accept
BOTH http://www.domain.com, as well as http://domain.com

is there a way for such to exist, with
vhost_alias ?

NameVirtualHost 203.41.6.80

# below directive works OK for http://www.domain.com
<VirtualHost 203.41.6.80:80>
# using /users/%domain%/web path, drop www. from browser
VirtualDocumentRoot /users/%2+/web
</VirtualHost>

# below directive works OK for http://domain.com
<VirtualHost 203.41.6.80:80>
# allow for hostless CNAMEs
VirtualDocumentRoot /users/%0/web
</VirtualHost>

how can I combine BOTH ?

ALSO, with vhost_alias support; how do I handle 'several doamin names to
one virtual host;

so:

www.a-name.com has 'real' structure;
www.b-name.com, www.c-name.com, etc, are all additional names that are to
serve www.a-name.com

how best to handle that with vhost_alias ?

Voytek Eymont
SBT Information Systems Pty Ltd
http://www.sbt.net.au/links/
phone +61-2 9310-1144 fax +61-2 9310-1118

 
 
 

vhost_alias Q: how to define BOTH www, and, www-less names ? multi-domains to one vhost-alias

Post by Tony Finc » Thu, 08 Jun 2000 04:00:00



Quote:

>I'd like to setup Apache with vhost_alias support, AND, be able to accept
>BOTH http://www.domain.com, as well as http://domain.com
>is there a way for such to exist, with vhost_alias ?

VirtualDocumentRoot /users/%-2+/web

This interpolates the last two pats of the domain name into the file name.

Quote:>ALSO, with vhost_alias support; how do I handle 'several doamin names to
>one virtual host;

Symbolic links.

Tony.
--

350 blister balm for bottle blowers

 
 
 

1. vhost_alias Q: how to define BOTH www, and, www-less names ? multi-domains to one vhost-alias


Tony,

thanks for your help.

I'm very new to Apache, so...

we run domain.com.au, as well as domain.com; so, I need to work from left
hand side, I think

my path is:

/users/%domain%/web
as in
/users/domain.com/web
or
/users/domain.com.au/web

so, %2+/web for www.domain.com.au
and, %0/web for host-less domains
(I think..)

BUT, can that co-exist as below....?
OR, I can not have BOTH directives ?
OR, which one has to go first , does it matter ?

NameVirtualHost 203.41.6.80

<VirtualHost 203.41.6.80:80>
VirtualDocumentRoot /users/%2+/web
</VirtualHost>

<VirtualHost 203.41.6.80:80>
# allow for hostless CNAMEs
VirtualDocumentRoot /users/%0/web
</VirtualHost>

so, when I have:

domain.com and corresponding /users/domain.com/web

and, same owner also has
anotherdomain.com and onemore.com and newone.com

and, we want request to www. ANY of above to be same as www.domain.com:

it's done with "Symbolic links" and, it will co-exist with vhost_alias, yes
?.

(like I said, another PITA Apache newbie...)

but, the vhost_alis, great idea !!!

Voytek Eymont
SBT Information Systems Pty Ltd
http://www.sbt.net.au/links/
phone +61-2 9310-1144 fax +61-2 9310-1118


2. telnet problem & solution !

3. Help with www domain and name aliases

4. problem with shell script

5. WWW Aliases into new domain names

6. bootable cd

7. vhost_alias with "www" subdomain

8. How do i do this...?

9. Supporing multiple domain names with your WWW server

10. Why my domain name works only with a WWW prefix ?!?

11. Two www domains, one machine

12. newer: Supporing multiple domain names with your WWW server

13. WWW Pages attached to Domain Names?