Apache2 and virtual hosts.

Apache2 and virtual hosts.

am 27.10.2009 21:17:25 von Roger

Hello all,

After reading the apache documentation I came up with the following
configuration:

##############################################
ServerName "servername.domain.com:80"
NameVirtualHost *:80

# Default.

Servername "servername.domain.com"
DocumentRoot "/path/default"
ServerSignature "Off"


# vhost1

ServerName "domain001.com"
VirtualDocumentRoot "/path/vhost1/%-2.0.%-1.0"
ServerAlias "www.domain001.com"
ServerSignature "Off"


# vhost2

ServerName "domain002.com"
VirtualDocumentRoot "/path/vhost2/%-2.0.%-1.0"
ServerAlias "*.domain002.com"
ServerAlias "domain003.com www.domain003.com"
ServerAlias "domain004.com www.domain004.com"
ServerAlias "domain005.com www.domain005.com"
ServerAlias "domain006.com www.domain006.com"
ServerSignature "Off"


##############################################

I'm trying to figure out why is it that I cannot access vhost2 using
www.domain00{3-6}.com. If I use domain00{3-6}.com it works fine.

I have A records point www to the corresponding domains but still I
cannot get it
working.

Any ideas why apache2 does not match some of the server aliases under vhost2.

Thank you for your time,

-r

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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

Re: Apache2 and virtual hosts.

am 27.10.2009 21:20:28 von Eric Covener

> =A0 =A0 =A0 ServerAlias =A0 =A0 =A0 =A0 =A0 =A0 "domain003.com www.domain=
003.com"

Those are one hostname with spaces in them, not two hostnames. Lose
the quotes or quote each one separately.


--=20
Eric Covener
covener@gmail.com

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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

Re: Apache2 and virtual hosts.

am 27.10.2009 21:27:09 von Roger

Oh wow! Out of everything that I expected that could be the reason,
that one was not even close to pass my mind.

Thank you so much.

-r

On Tue, Oct 27, 2009 at 4:20 PM, Eric Covener wrote:
>> =A0 =A0 =A0 ServerAlias =A0 =A0 =A0 =A0 =A0 =A0 "domain003.com www.domai=
n003.com"
>
> Those are one hostname with spaces in them, not two hostnames. =A0Lose
> the quotes or quote each one separately.
>
>
> --
> Eric Covener
> covener@gmail.com
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project=
..
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> =A0 " =A0 from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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