Subject: SSL with multiple domains on same server

From: Ludovic Perard <[email-masked]>
Date: Wed, 20 Nov 2002 15:25:01 +0100

Hello.

  I'm trying to set up Apache with SSL on Windows 2000.

  It is working but I have some troubles with the certificates.

  If my Apache server is server.mydomain.com and I want to have two
  websites with HTTPS. The SSL is well enabled and works fine.

  It is what I did :

  * openssl req -config openssl.cnf -new -out -website1.csr

    -> then I put "website1.mydomain.com" as common name

  * openssl rsa -in privkey.pem -out website1.key

  * openssl x509 -in website1.csr -out website1.cert -req -signkey website1.key -days 365

    -> To have a temporary signed key

  Then, I did all these operation a second time for the website2.
  (with "website2.mydomain.com" as common name for the second .csr)

  At he end, I have these files :

   - website1.cert
   - website1.key
   - website2.cert
   - website2.key

  In httpd.conf I set up both sites :

  <VirtualHost website1.mydomain.com:443>
  SSLEngine On
  SSLCertificateFile ssl/website1.cert
  SSLCertificateKeyFile ssl/website1.key
  </VirtualHost>

  <VirtualHost website2.mydomain.com:443>
  SSLEngine On
  SSLCertificateFile ssl/website2.cert
  SSLCertificateKeyFile ssl/website2.key
  </VirtualHost>

  website1 and website2 has different IP address

  And then, my problem apears.

  In my browser, I can go two both sites with SSL, but both takes the
  same certificate... Why ? Is there a mismatch between name of the
  server and names of the websites ?

-- 
Best regards,
 Ludovic                           
 [email-masked]

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

---

From: Kristijan Cafuta RIP <[email-masked]>
Date: Wed, 20 Nov 2002 19:33:42 +0100

Try using IP based virtual host and not name based

lp, K

Wednesday, November 20, 2002, 3:25:01 PM, you wrote:

LP> Hello.

LP>   I'm trying to set up Apache with SSL on Windows 2000.

LP>   It is working but I have some troubles with the certificates.

LP>   If my Apache server is server.mydomain.com and I want to have two
LP>   websites with HTTPS. The SSL is well enabled and works fine.

LP>   It is what I did :

LP>   * openssl req -config openssl.cnf -new -out -website1.csr

LP>     -> then I put "website1.mydomain.com" as common name

LP>   * openssl rsa -in privkey.pem -out website1.key

LP>   * openssl x509 -in website1.csr -out website1.cert -req -signkey website1.key -days 365

LP>     -> To have a temporary signed key

LP>   Then, I did all these operation a second time for the website2.
LP>   (with "website2.mydomain.com" as common name for the second .csr)

LP>   At he end, I have these files :

LP>    - website1.cert
LP>    - website1.key
LP>    - website2.cert
LP>    - website2.key

LP>   In httpd.conf I set up both sites :

LP>   <VirtualHost website1.mydomain.com:443>
LP>   SSLEngine On
LP>   SSLCertificateFile ssl/website1.cert
LP>   SSLCertificateKeyFile ssl/website1.key
LP>   </VirtualHost>

LP>   <VirtualHost website2.mydomain.com:443>
LP>   SSLEngine On
LP>   SSLCertificateFile ssl/website2.cert
LP>   SSLCertificateKeyFile ssl/website2.key
LP>   </VirtualHost>

LP>   website1 and website2 has different IP address

LP>   And then, my problem apears.

LP>   In my browser, I can go two both sites with SSL, but both takes the
LP>   same certificate... Why ? Is there a mismatch between name of the
LP>   server and names of the websites ?

-- 
 Kristijan                            mailto:[email-masked]