How to configure SSL for my VirtualHosts on Apache 2

Can someone plz help with some examples of an httpd.conf file of how to configure SSl support for a) entire VirtualHost folder, and b) only certain sub-folder of a VirualHost. I also need help to create the certificates etc (self signed).

LVL 17
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You can not configure SSL support for virtual hosts unless each virtual host has its own IP.  
The reason?  Because the handshaking for SSL happens before Apache ever finds out which host is being requested, so you'd not be able to associate a certificate with a given host.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
psimationAuthor Commented:
Would it then be possible to use only one domain, the FQDN of the server? IE, if one of my virtualhosts needs secure folder, I just point it to a subfolder of the "top" domain?  
Yes.   You can have virtual hosts and SSL on the same box, just ensure that your default host is the one configured for SSL and use that.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

psimationAuthor Commented:
Well, that's sort of why I asked the question... Can you give me examples of how to configure it?
A complete guide to configuring Apache and SSL can be found at:

Look in the upper right-hand corner of the screen and you'll see the guide available.  Don't be put off by the fact that it mentions Thawte, the configuration is the same for whichever  certificate you choose.

The file you'll need to configure is:   /etc/httpd/conf.d/ssl.conf

The default virtual host is the first one in your httpd.conf file.

If you have specific questions after checking that guide then be sure to post away!
> You can not configure SSL support for virtual hosts unless each virtual host has its own IP.
This statement is incorrect.  I use Apache (for WinNT) and I am using SSL on more than one NameVirtualHost.  It works perfectly fine.  I even have a standard HTTP in addition to the SSL-enabled HTTPS, with a couple of HTTP redirecting to the HTTPS of the same name.

If I had access to my server system right now, to post some .conf snippets, I would.  Unfortunately, I'm at work, on my break, and my server is currently offline ATM. :-P

But, it is absolutely possible to do...  Read the documentation at the links provided by everyone else, and you should be fine.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.