httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J. Bakshi" <joyd...@infoservices.in>
Subject Re: [users@httpd] how to get multiple SSL with name based vhost ?
Date Wed, 02 Dec 2009 03:11:46 GMT
Krist van Besien wrote:
> You seem to be a bit confused about how to configure name based virtual hosts..
>
>
> On Tue, Dec 1, 2009 at 10:53 AM, J. Bakshi <joydeep@infoservices.in> wrote:
>
>
>   
>> ` ` ` `
>> Listen 443
>> NameVirtualHost  example1.de:443
>>
>> <VirtualHost  example1:443>
>> SSLEngine on
>> SSLCipherSuite HIGH:MEDIUM
>> SSLProtocol all -SSLv2
>> SSLCertificateFile /etc/apache2/myca/mars-server.crt
>> SSLCertificateKeyFile /etc/apache2/myca/mars-server.key
>> SSLCertificateChainFile /etc/apache2/myca/my-ca.crt
>> ServerName https://example1.de
>> ServerAlias https://example1.de
>>
>> DocumentRoot /srv/www/htdocs/blevti.opendingo.de
>> DirectoryIndex index.php
>> </VirtualHost>
>>
>>
>> NameVirtualHost  example2.de:443
>> <VirtualHost  example2:443>
>> SSLEngine on
>> SSLCipherSuite HIGH:MEDIUM
>> SSLProtocol all -SSLv2
>> SSLCertificateFile /etc/apache2/myca/mars-server.crt
>> SSLCertificateKeyFile /etc/apache2/myca/mars-server.key
>> SSLCertificateChainFile /etc/apache2/myca/my-ca.crt
>> ServerName https://example2.de
>> ServerAlias https://example2.de
>>
>> DocumentRoot /srv/www/htdocs/example2.de
>> DirectoryIndex index.php
>> </VirtualHost>
>>     
>
> You should have only one "NameVirtualHost" statement, per IP/Port
> combination, so unless you have a multi homed host this should be:
>
> NameVirtualHost *:433
>
> And your VirtuaHost blocks should all be like this:
>
> <VirtualHost *:433>
> ServerName example1.de
> ... your directives here
>
> </VirtualHost>
>
> <VirtualHost *:433>
> ServerName example2.de
> ... your directives here
>
> </VirtualHost>
>
>
> etc...
>
> It is the "ServerName" directive that tells Apache which virtualhost is which.
>
>
> Krist
>
>
>   

Hello Krist,

Thanks for your example. I have tried to implement it but as I mentioned
before whatever be the server name it always opens the site which apache
has detected as default.  Here is the output from  " apache2ctl -S"

` ` `
wildcard NameVirtualHosts and _default_ servers:
*:443                  is a NameVirtualHost
         default server example1.de (/etc/apache2/vhosts.d/ssl.conf:5)
         port 443 namevhost example1.de (/etc/apache2/vhosts.d/ssl.conf:5)
         port 443 namevhost example2.de (/etc/apache2/vhosts.d/ssl.conf:51)
Syntax OK
` ` `

The configuration is exactly same which you have suggested above. Any
thing which I am overlooking here ?

Thanks

-- 
জয়দীপ বক্সী


---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message