[opensuse] Apache2 default host using virtual hosts
- From: Oscar Curero <flextron@xxxxxxxxx>
- Date: Mon, 1 Nov 2010 11:05:11 +0100
Hi,
I'm trying to configure apache2 to use three virtual hosts. I want to
use one of them (www.mydomain.com) as the "default server" to serve
all the domains that don't match any of the virtual host defined.
Using yast I created all the vhosts, I want to use:
/etc/apache2/vhosts.d/
...................................admin.mydomain.com.conf
...................................webmail.mydomain.com.conf
...................................www.mydomain.dom.conf
...................................vhost-ssl.template
...................................vhost.template
According to the apache documentation, the default host is the first defined:
"Now when a request arrives, the server will first check if it is
using an IP address that matches the NameVirtualHost. If it is, then
it will look at each <VirtualHost> section with a matching IP address
and try to find one where the ServerName or ServerAlias matches the
requested hostname. If it finds one, then it uses the configuration
for that server. If no matching virtual host is found, then the first
listed virtual host that matches the IP address will be used."
In opensuse, each virtual host is defined in is own file, so the first
defined host depends on the filename, but because yast choose the name
based on the domain name, the first domain is "admin.mydomain.com" and
not the one I want "www.mydomain.com". Just changing
"www.mydomain.com.conf" to "1-www.mydomain.com.conf" makes apache to
set the default name the domain I want (however, this is reverted each
time I start yast).
Is this normal or I'm being hitting by a bug?
Thanks in advance!
Cheers,
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
- Follow-Ups:
- Re: [opensuse] Apache2 default host using virtual hosts
- From: Per Jessen
- Re: [opensuse] Apache2 default host using virtual hosts
- Prev by Date: Re: [opensuse] can't connect to open WLAN (everybody else can)
- Next by Date: Re: [opensuse] Disappearing CD/DVD ROM [SOLVED]
- Previous by thread: Re: [opensuse] can't connect to open WLAN (everybody else can)
- Next by thread: Re: [opensuse] Apache2 default host using virtual hosts
- Index(es):
Relevant Pages
|