Are multiple <VirtualHost *:80 *:443> ok with wildcard cert ?

This is a discussion on Are multiple <VirtualHost *:80 *:443> ok with wildcard cert ? within the Modssl Users forums, part of the Web Server and Related Forums category; Hi, (Apache 2.0.55, Linux 2.6) I can't find authoritative answer about the following question. I would ...


Go Back   Usenet Forums > Web Server and Related Forums > Modssl Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-16-2006
Frédéric Jolliton
 
Posts: n/a
Default Are multiple <VirtualHost *:80 *:443> ok with wildcard cert ?

Hi,

(Apache 2.0.55, Linux 2.6)

I can't find authoritative answer about the following question.

I would like to be sure that I can have multiple VirtualHost
configured simultaneously for HTTP and HTTPS (port 80 and port 443
respectively) as presented below.

If I've a certificate with 'cn' to '*.example.com' and the following
Apache configuration, is that ok ? Currently it works fine, but I'm
not sure if I'm relying on some unspecified/undefined behaviors.

Also, is this dummy VirtualHost (the first one) the correct way to
"force" a given port to answer HTTP instead of HTTPS ? (I know that
it's the other way, where the "first" virtual host with enabled SSL
determine port with HTTPS.)

Again, there is no problems with this config, but I was just wondering
about its validity.

-=3D-=3D-
Listen 80
Listen 443

NameVirtualHost *:80
NameVirtualHost *:443

<VirtualHost *:80>
# Dummy empty VirtualHost to ensure than port 80 is HTTP
</VirtualHost>

<VirtualHost *:80 *:443>
Include common-ssl.conf
ServerName foo.example.com
[..]
</VirtualHost>

<VirtualHost *:80 *:443>
Include common-ssl.conf
ServerName bar.example.com
[..]
</VirtualHost>
-=3D-=3D-

and common-ssl.conf contains:

-=3D-=3D-
<IfModule mod_ssl.c>
SSLEngine on
SSLCertificateFile conf/ssl/web.example.com-cert.pem
SSLCertificateKeyFile conf/ssl/web.example.com-key.pem
SSLCertificateChainFile conf/ssl/root-cert.pem
[.. other SSL options ..]
</IfModule>
-=3D-=3D-

--=20
Fr=E9d=E9ric Jolliton
__________________________________________________ ____________________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List modssl-users@modssl.org
Automated List Manager majordomo@modssl.org
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:52 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0