Subject: how to add multiple SSL cert for each virtual host?

From: "Thomas Sandor" <[email-masked]>
Date: Tue, 3 Dec 2002 19:19:43 +0100

hi everyone,

I have an apache 2.0.40 installed on a RedHat 7.2 box, complied with ssl
(openssl 0.9.6g).
Till now I had only one domain for which apache should use SSL cert files
(crt, key), but for our next project I have to add another SSL cert file a
specific domain.

I have NameVirtualHost 12.34.56.78 and have a list of <virtualhost/> for
each of our domain, using ServerNamed base aliases, but for the ssl conf it
ain't works. In my ssl.conf in short looks like this:

NameVirtualHost 12.34.56.78:443

<VirtualHost 12.34.56.78:443>
    ServerName domain1.com
    CustomLog "..."
    ErrorLog "..."
    SSLEngine on
    SSLCertificateFile "/somewhere/ssl.crt/domain1.crt"
    SSLCertificateKeyFile "somewhere/ssl.key/domain1.key"
</VirtualHost>

<VirtualHost 12.34.56.78:443>
    ServerName domain2.com
    CustomLog "..."
    ErrorLog "..."
    SSLEngine on
    SSLCertificateFile "/somewhere/ssl.crt/domain2.crt"
    SSLCertificateKeyFile "somewhere/ssl.key/domain2.key"
</VirtualHost>

The problem is that apache does not serve domain2 cert files for domain2, it
uses the first declaration for every https://domainX.com invoke. Does anyone
know how to tell apache to uses specific SSL cert I'd like to define for
each of my virtualhosts?

Thanks in advance for any help.

Regards,
Thomas

______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [email-masked]
Automated List Manager                            [email-masked]

---

From: "R. DuFresne" <[email-masked]>
Date: Tue, 3 Dec 2002 13:26:50 -0500 (EST)

On Tue, 3 Dec 2002, Thomas Sandor wrote:

	[SNIP]

> know how to tell apache to uses specific SSL cert I'd like to define for

Yes assign a seperate IP address or port for each domain you wish to host.

Thanks,

Ron DuFresne
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        admin & senior security consultant:  sysinfo.com
                        http://sysinfo.com

"Cutting the space budget really restores my faith in humanity.  It
eliminates dreams, goals, and ideals and lets us get straight to the
business of hate, debauchery, and self-annihilation."
                -- Johnny Hart

testing, only testing, and damn good at it too!