You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Roger <rn...@gmail.com> on 2009/10/27 21:17:25 UTC

[users@httpd] Apache2 and virtual hosts.

Hello all,

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

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

# Default.
<VirtualHost *:80>
       Servername              "servername.domain.com"
       DocumentRoot            "/path/default"
       ServerSignature         "Off"
</VirtualHost>

# vhost1
<VirtualHost *:80>
       ServerName              "domain001.com"
       VirtualDocumentRoot     "/path/vhost1/%-2.0.%-1.0"
       ServerAlias             "www.domain001.com"
       ServerSignature         "Off"
</VirtualHost>

# vhost2
<VirtualHost *:80>
       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"
</VirtualHost>

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

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 <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


Re: [users@httpd] Apache2 and virtual hosts.

Posted by Roger <rn...@gmail.com>.
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 <co...@gmail.com> wrote:
>>       ServerAlias             "domain003.com www.domain003.com"
>
> Those are one hostname with spaces in them, not two hostnames.  Lose
> 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 <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
>
>

---------------------------------------------------------------------
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


Re: [users@httpd] Apache2 and virtual hosts.

Posted by Eric Covener <co...@gmail.com>.
>       ServerAlias             "domain003.com www.domain003.com"

Those are one hostname with spaces in them, not two hostnames.  Lose
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 <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