[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] Re: Sub-Domains on RaQ2
- Subject: [cobalt-users] Re: Sub-Domains on RaQ2
- From: Michael Hoennig <michael@xxxxxxxxxx>
- Date: Sun Mar 26 00:09:34 2000
- Organization: Me organized? You´re kiddin´ - eh?
Hi propheci,
> hmm...it's still not working for me. for the httpd.conf, the
> XX.XX.XX.XX should just be my IP address for the virtual site of
> domain.com, right?
right. It can be the same IP than any other VirtualServer you have ony
your machine.
> and the DNS A Records. i just added a record that points
> blah.domain.com to the same IP address for domain.com, is that correct
> also?
Yes, that is ok.
But now I see I was blind, somehow, yesterday morning:
> > and editing the httpd.conf with
> >
> > <VirtualHost XX.XX.XX.XX>
> > ServerName blah.domain.com
> > Redirect / http://domain.com/blah/
> > </VirtualHost>
Use "DocumentRoot" instead of "Redirect". Addiontally you need a
"NameVirtualHost" directive before your first virtual host of this IP
when you use name based distinction. For separat IP numbers you don´t
need that. In the case of name based virtual hosts you need to have a
VirtualHost segment for ALL your servers on this IP - see this example
(use YOUR IP numbers and YOUR domain names):
NameVirtualHost 4.27.85.221
<VirtualHost 4.27.85.221>
ServerName www.domain.de
ServerAdmin domain-owner
DocumentRoot /home/sites/www.domain.de/web
ServerAlias domain.de
RewriteEngine on
RewriteCond %{HTTP_HOST} !^4.27.85.221(:80)?$
RewriteCond %{HTTP_HOST} !^www.domain.de(:80)?$
RewriteRule ^/(.*) http://www.domain.de/$1 [L,R]
RewriteOptions inherit
</VirtualHost>
<VirtualHost 4.27.85.221>
ServerName sub.domain.de
ServerAdmin sub-owner
DocumentRoot /home/sites/www.domain.de/web/blah
RewriteEngine off
RewriteCond %{HTTP_HOST} !^sub.domain.de(:80)?$
RewriteRule ^/(.*) http://sub.domain.de/$1 [L,R]
RewriteOptions inherit
</VirtualHost>
Sorry for misreading your VirtualHost section yesterday morning, I was
obviously blind ;-(
Michael
P.S. I send this back to the list too, to correct my mistake.
--
Boytinstr. 10 - D-22143 Hamburg - Germany ----- http://www.hoennig.de
home:++49 40 67581412 office:++49 40 23646958 mobile:++49 177 3787491
http://www.binational-in.de -- Forum für binationale Paare & Familien
http://www.lug-stormarn.eu.org - Linux User Group Stormarn / Holstein