SSL cert when using and on same server

I hope this will make sense to you.

The primary web site on the server (centos7) is
A secondary site is on the same server but NOT as an alias in the directives.
In other words, they are two separate servers.
Both are set up in the VirtualHost section of httpd.conf of apache 2.2.

The question is, how many SSL certs do I need to get to use both domain names?
Typically, when you get a cert, you give the full name of the server or domain.
In my case, the server name is something like

I would prefer not to have to buy two certs but it's ok if I do, the main concern is that I need SSL for both instances.

Finally, how do I set this up?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

I know that the free Class1 certs available at automatically come with both and names, so what you're asking for is possible. It mainly depends on what your SSL certificate signer is willing to give you.

For somewhat more money, you can just get a "wildcard" cert for * that will normally also include -- this kind of cert can usually be used on as many servers as you need.
Apache 2.2 requires that each SSL host is on a separate IP address, so while you can use the current certificate that you have, you will need to use a separate IP for each domain (even though they are the same TLD) within the VirtualHost directive.

With Apache 2.4 you can use the same IP for multiple certificates/virtualhosts.

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
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.