Re: Wildcard and Specific Vhosts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 19, 2011 at 7:38 AM, Callum Scott <scott.callum@xxxxxxxxx> 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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux