Re: how to get multiple SSL with name based vhost ?

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

 



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