> -----Original Message-----
> From: Octavian Rasnita [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, October 19, 2006 10:03 PM
> To: users@httpd.apache.org
> Subject: Re: [EMAIL PROTECTED] multiple vhosts on port 80 and port 443
> 
> Couldn't be installed a virtual interface instead of a real 
> second network
> card, and use it for another SSL virtualhost?

The key to undestanding all this is to think in layers...
(http://en.wikipedia.org/wiki/OSI_model)

The SSL negotiation occurs at a layer *below* HTTP. That is, the SSL
channel is set up before any HTTP traffic is sent or received. Host
headers are part of HTTP so never arrive while SSL is being set up. So
SSL can't use anything in the HTTP packet to decide on certificates etc.

On the other hand the SSL layer (the Presentation layer, to be precise)
is in a layer *above* the TCP/IP layer (the Transport layer) so SSL can
use TCP/IP attributes like IP address and port number.

So you can have as many SSL VHs on the server as you like, so long as
they are all distinct at the TCP/IP layer (ie different IP:port
combinations).

Another quirky thing, that catches a lot of people out is that if you
*do* set up NBVH with SSL and if you ignore the "site doesn't match
cert" warning, then it will "work"! Ie, requests for https://site1 will
serve site1 and https://site2 will serve site2. This is because, once
the SSL channel gets set up (using cert1 as default), apache *can* then
decrypt the packets and so gain access to the Host headers, then NBVH
works as normal. The snag is that visitors to site2 are going through a
channel encrypted with site1's cert. Their browsers will, quite rightly,
warn them about this important security risk. This might be OK for
test/development environements but it is not a solution for real-world,
commercial internet.

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored.   
> 
> Teddy
> 
> ----- Original Message ----- 
> From: "Boyle Owen" <[EMAIL PROTECTED]>
> To: <users@httpd.apache.org>
> Sent: Thursday, October 19, 2006 3:16 PM
> Subject: RE: [EMAIL PROTECTED] multiple vhosts on port 80 and port 443
> 
> 
> > -----Original Message-----
> > From: joe pond [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, October 19, 2006 2:59 PM
> > To: users@httpd.apache.org
> > Subject: [EMAIL PROTECTED] multiple vhosts on port 80 and port 443
> >
> > I noticed on 10/19/2006 several postings about this. I may
> > have included too
> > much stuff but some folks may need the info.
> >
> > The following configuration setup enables me to have multiple
> > vhost on port
> > 80 and multiple vhosts on port 443 and I can require
> > login/password or not
> > for eithe port 80 or port 443.
> >
> > The non-matching server name on the 2nd 443 host would seem to be
> > resolveable by creating another certificate with that servers
> > name in it but
> > I have not tried that yet.
> 
> Don't bother - it won't work. As masro says, the SSL channel is
> established first - before the server gets the Host header 
> that it needs
> for NameVirtualHost resolution. So the server will always use 
> the certs
> from the first SSL VH to set up the connection.
> 
> Check the archive for SSL NBVH - it's been gone over a million times
> already...
> 
> Rgds,
> Owen Boyle
> Disclaimer: Any disclaimer attached to this message may be ignored.
> 
> >
> > HTH
> >
> > digger920
> >
> >
> > Apache2.2.X, SSL, Vhosts
> >
> > I use include files to make troubleshooting a bit easier.
> > This is a WAMP server BTW.
> >
> > In httpd.conf
> >
> > Listen 192.168.10.4:80
> > Listen 192.168.10.4:443
> >
> > LoadModule ssl_module modules/mod_ssl.so
> >
> >
> >
> > # Virtual hosts
> > Include conf/extra/httpd-vhosts.conf
> >
> > # Secure (SSL/TLS) connections
> > Include conf/extra/httpd-ssl.conf
> >
> > <IfModule ssl_module>
> > SSLMutex default
> > SSLSessionCache none
> > SSLRandomSeed startup builtin
> > SSLRandomSeed connect builtin
> > </IfModule>
> >
> > ========================
> >
> > In httpd-vhosts.conf
> >
> > NameVirtualHost *:80
> >
> > <VirtualHost *:80>
> >     ServerAdmin [EMAIL PROTECTED]
> >     ServerName juneau
> >     DocumentRoot "C:/Server/Apache2.2/htdocs"
> >
> >     #ErrorLog logs/dummy-host.example.com-error_log
> >     #CustomLog logs/dummy-host.example.com-access_log common
> > </VirtualHost>
> >
> > <VirtualHost *:80>
> >     ServerAdmin [EMAIL PROTECTED]
> >     ServerName ASite
> >     #ServerAlias Test1
> >     DocumentRoot "C:/Server/Apache2.2/htdocs/www/A-Site"
> >
> >     #ErrorLog logs/dummy-host2.example.com-error_log
> >     #CustomLog logs/dummy-host2.example.com-access_log common
> > </VirtualHost>
> >
> > <VirtualHost *:80>
> >     ServerAdmin [EMAIL PROTECTED]
> >     ServerName secure
> >     DocumentRoot "C:/Locked"
> >     <Directory /Locked>
> >     AuthType Basic
> >     AuthName "Locked Test"
> >     AuthUserFile C:/Server/Apache2.2/htdocs/passwords/pwrd
> >     Require user testuser
> >     Order allow,deny
> > Allow from all
> >     </Directory>
> >     #ErrorLog logs/dummy-host2.example.com-error_log
> >     #CustomLog logs/dummy-host2.example.com-access_log common
> > </VirtualHost>
> >
> > ==================================
> >
> > In httpd-ssl.conf
> >
> > NameVirtualHost *:443
> >
> > ##  SSL Global Context
> >
> > AddType application/x-x509-ca-cert .crt
> > AddType application/x-pkcs7-crl    .crl
> >
> > SSLSessionCache
> > shmcb:c:/server/apache2.2/logs/ssl_scache(512000)
> > SSLSessionCacheTimeout  300
> >
> > ## SSL Virtual Host Context
> >
> > <VirtualHost *:443>
> >
> > #   General setup for the virtual host
> > ServerName juneau
> > ServerAdmin [EMAIL PROTECTED]
> > DocumentRoot "c:/SecureToo/"
> >
> > <Directory /SecureToo>
> > Order allow,deny
> > Allow from all
> > </Directory>
> >
> >
> > ErrorLog
> > c:/server/apache2.2/logs/vhost_SSL_error_log.log
> > TransferLog
> > c:/server/apache2.2/logs/vhost_SSL_access_log.log
> >
> >
> > #   SSL Engine Switch:
> > #   Enable/Disable SSL for this virtual host.
> > SSLEngine on
> >
> > SSLCipherSuite
> > ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
> >
> > SSLCertificateFile c:/server/apache2.2/conf/ssl/juneau.crt
> >
> > SSLCertificateKeyFile c:/server/apache2.2/conf/ssl/juneau.key
> >
> > SSLCertificateChainFile c:/server/apache2.2/conf/ssl/juneau.crt
> >
> > <FilesMatch "\.(cgi|shtml|phtml|php)$">
> >     SSLOptions +StdEnvVars
> > </FilesMatch>
> > <Directory "c:/server/apache2.2/cgi-bin">
> >     SSLOptions +StdEnvVars
> > </Directory>
> >
> > BrowserMatch ".*MSIE.*" \
> >          nokeepalive ssl-unclean-shutdown \
> >          downgrade-1.0 force-response-1.0
> >
> > CustomLog c:/server/apache2.2/logs/ssl_request_log \
> >           "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
> >
> > </VirtualHost>
> >
> > <VirtualHost *:443>
> >     ServerAdmin [EMAIL PROTECTED]
> >     ServerName secure
> >     DocumentRoot "C:/Locked/"
> >     <Directory /Locked>
> >     AuthType Basic
> >     AuthName "Locked Test"
> >     AuthUserFile C:/Server/Apache2.2/htdocs/passwords/pwrd
> >     Require user jpond
> >     Order allow,deny
> > Allow from all
> >     </Directory>
> >     #ErrorLog logs/dummy-host2.example.com-error_log
> >     #CustomLog logs/dummy-host2.example.com-access_log common
> > </VirtualHost>
> >
> > _________________________________________________________________
> > Add a Yahoo! contact to Windows Live Messenger for a chance
> > to win a free
> > trip!
> > http://www.imagine-windowslive.com/minisites/yahoo/default.asp
> x?locale=en-us&hmtagline
> >
> >
> > 
> ---------------------------------------------------------------------
> > 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: [EMAIL PROTECTED]
> >    "   from the digest: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> This message is for the named person's use only. It may contain
> confidential, proprietary or legally privileged information. No
> confidentiality or privilege is waived or lost by any 
> mistransmission. If
> you receive this message in error, please notify the sender 
> urgently and
> then immediately delete the message and any copies of it from 
> your system.
> Please also immediately destroy any hardcopies of the 
> message. You must not,
> directly or indirectly, use, disclose, distribute, print, or 
> copy any part
> of this message if you are not the intended recipient. The 
> sender's company
> reserves the right to monitor all e-mail communications through their
> networks. Any views expressed in this message are those of 
> the individual
> sender, except where the message states otherwise and the sender is
> authorised to state them to be the views of the sender's company.
> 
> ---------------------------------------------------------------------
> 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: [EMAIL PROTECTED]
>    "   from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> 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: [EMAIL PROTECTED]
>    "   from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
 
 
This message is for the named person's use only. It may contain confidential, 
proprietary or legally privileged information. No confidentiality or privilege 
is waived or lost by any mistransmission. If you receive this message in error, 
please notify the sender urgently and then immediately delete the message and 
any copies of it from your system. Please also immediately destroy any 
hardcopies of the message. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the intended 
recipient. The sender's company reserves the right to monitor all e-mail 
communications through their networks. Any views expressed in this message are 
those of the individual sender, except where the message states otherwise and 
the sender is authorised to state them to be the views of the sender's company.

---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to