[Linux-Biella] Https con VirtualHost

Alessio Re linux@bilug.linux.it
Sun, 25 May 2003 22:07:21 +0200


On Sunday 25 May 2003 14:30, Luca Bertoncello wrote:
> Ciao a tutti!
>
> Piccolo problemino con Apache...
> Ho un Server, con parecchi VirtualHosts.
> Uno di questi VirtualHost e' attualmente protetto con SSL (https).
>
> Vorrei metterne un altro, ma semplicemente duplicando la configurazione del
> primo VirtualHost (cambiando ovviamente, i files delle chiavi e le
> directory dei files), non funziona. Mi viene sempre visualizzato il primo
> sito...
>
> Eppure so che e' possibile! Il provider che mi ospita lucabert.de usa
> Apache e offre, sempre con un solo IP, il sito con https...

Se sono name-based, non e' possibile. Dalla documentazione di Apache 2.0:

"Name-based virtual hosting is usually simpler, since you need only configure 
your DNS server to map each hostname to the correct IP address and then 
configure the Apache HTTP Server to recognize the different hostnames. 
Name-based virtual hosting also eases the demand for scarce IP addresses. 
Therefore you should use name-based virtual hosting unless there is a 
specific reason to choose IP-based virtual hosting. Some reasons why you 
might consider using IP-based virtual hosting:

Some ancient clients are not compatible with name-based virtual hosting. For 
name-based virtual hosting to work, the client must send the HTTP Host 
header. This is required by HTTP/1.1, and is implemented by all modern 
HTTP/1.0 browsers as an extension. If you need to support obsolete clients 
and still use name-based virtual hosting, a possible technique is discussed 
at the end of this document.

--> Name-based virtual hosting cannot be used with SSL secure servers because 
--> of the nature of the SSL protocol.

Some operating systems and network equipment implement bandwidth management 
techniques that cannot differentiate between hosts unless they are on 
separate IP addresses."

Ciao.