Subject: Vitual Hosts not working with SSL

From: "ComCity" <[email-masked]>
Date: Sun, 8 Jun 2003 09:27:57 -0700

I'm very confused about the Virtual Host configuration in Apache
2.0....stuff that use to work seems like it doesn't and I gotta
think thats because I don't know what I'm doing.  ;)

I need to run Named-based virtual hosts as was as IP based virtual hosts.
The IP based virtual hosts need to simultaneously listen on port 80 and port
443 for the same IP address to handle ssl.  It seems to me I should be able
to do this:

Listen 80
Listen 443
NameVirtualHost 219.11.62.74

#Name-based Virtual Hosts first

<VirtualHost 219.11.62.74>
DocumentRoot /home/webs/default
ServerName www.server1.com
</VirtualHost>

<VirtualHost 219.11.62.74>
DocumentRoot //server2
ServerName www.server2.com
</VirtualHost>

#Ip-based virtual Hosts next

<VirtualHost 219.11.62.102:80>
DocumentRoot /home/webs/SSLSite1
ServerName www.SSLSite1.com:80
</VirtualHost>

# Then put this stuff in my SSL conf file.

<VirtualHost 219.11.62.102:443>
DocumentRoot /home1/webs/SSLSite1
ServerName www.SSLSite1.com:443
SSLEngine ON
SSLCertificateFile /usr/local/certs/anything.com.crt
SSLCertificateKeyFile /usr/local/certs/anything.com.key
</VirtualHost>

I understand that the limitations of SSL requiring a unique IP and that it
can not be a named-based host...but you should be able to run the
certificate on the same IP if the port is unique.  How is this done now?
How do you config a single IP for SSL on port 443 and reuse that IP for the
website on port 80?

Thank You very much.
Michael

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

---

From: Cliff Woolley <[email-masked]>
Date: Sun, 8 Jun 2003 14:57:26 -0400 (EDT)

> think thats because I don't know what I'm doing.  ;)

Can you be more specific about what it's (not) doing?  Other than the fact
that the snippet you sent in omitted certain important SSL directives
(which are probably present elsewhere in your config file if it worked
under Apache 1.3), the config looks okay to me, at least in terms of
NBVH vs. IPBVH.

--Cliff

---

From: "ComCity" <[email-masked]>
Date: Mon, 9 Jun 2003 08:19:53 -0700

Thanks Cliff.  It was not loaded...Apache failed to start.  The solution,
copy the ssl.conf information into the http.conf file without changing a
single thing.