Re: Two _default_, one for port 80 and another for port 443

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

 



> David BERCOT wrote:
> > Is it possible to have two _defaut_ sections in apache2.conf, one for
> > http and another for https ?

On 23.12.08 16:16, Davide Bianchi wrote:
> Well, by definition, the first 'vhost' for port 80 is the default for
> port 80 (http) and the first one for port 443 is the default for https.

the _default_ and the default virtualhost are in my understanding two
different things...

> > <VirtualHost _default_:80>
> > 	ServerName www.mondomaine.org
> > 	DocumentRoot /www/www.mondomaine.org
> > </VirtualHost>

this, the _default_ is the virtual host that applies on any IP thas has no
vrtual hosts defined.

> > <VirtualHost *:443>
> > 	ServerName sitehttps.mondomaine.org
> > 	DocumentRoot /www/sitehttps.mondomaine.org
> > 	[...]
> > </VirtualHost>

The default virtual host is the first name-based virtual host on defined IP.
This virtual host applies on ANY virtual IP.

> > Everything is ok !!!
> > But, if I add :
> > <VirtualHost _default_:443>
> > 	DocumentRoot /www/site2https.mondomaine.org
> > 	[...]
> > </VirtualHost>

> > I have this error :
> > Restarting web server: apache2[Tue Dec 23 15:59:49 2008] [warn]
> > _default_ VirtualHost overlap on port 443, the first has precedence ...

Ies, the _default_ will not match, because differetn virtual host was
defined on all other IP's.

> The problem with HTTPS is that the server won't be able to know which
> one is the one requested before decoding the request, for which he needs
> a certificate, so he ALWAY picks the first vhost for 443. That means
> that your 'default' https vhost HAVE TO BE the first one.

This has nothing to do with certificates, This is just
-- 
Matus UHLAR - fantomas, uhlar@xxxxxxxxxxx ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Depression is merely anger without enthusiasm. 

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