httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <cove...@gmail.com>
Subject Re: [users@httpd] Wildcard and Specific Vhosts
Date Tue, 19 Apr 2011 11:44:31 GMT
On Tue, Apr 19, 2011 at 7:38 AM, Callum Scott <scott.callum@gmail.com> wrote:
> Hi All,
>
> I am trying to get the following to work.  www.domain.co.uk domain.com to go
> to /home/somedir1 and then *.domain.com to go to /home/somedir2 however this
> doesn't appear to be working as expceted.  To difirenciate I have the two
> vhosts pointing to seperate logfiles and it appears that if I try to go to
> say cheese.domain.com I am being directed to /home/somedir1 as opposed to
> /home/somedir2.  My vhost.conf file is below, any pointers would pe
> appreciated.  Is it that I actually need to use a seperate ip address for
> the wildcard domain?
>
>
> NameVirtualHost <ip.add.re.ss>:80
>
> <VirtualHost<ip.add.re.ss>:80>
>         ServerName www.domain.co.uk
>         ServerAlias subdomain.domain.co.uk domain.co.uk
>         ServerAdmin admin@address
>         DocumentRoot /home/somedir1
>         CustomLog /home/logs/domain.co.uk/access_log combined
>         ErrorLog  /home/logs/domain.co.uk/error_log
> </VirtualHost>
>
> <VirtualHost<ip.add.re.ss>:80>
>         ServerName *.domain.co.uk

Make this a ServerAias and set a normal ServerName -- ServerName can't
be a wildcard.

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