SSL cert when using www.domain.com and domain.com on same server

I hope this will make sense to you.

The primary web site on the server (centos7) is www.domain.com.
A secondary site is domain.com on the same server but NOT as an alias in the www.domain.com 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 x32.domain.com.

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?
projectsAsked:
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.

jmcgOwnerCommented:
I know that the free Class1 certs available at StartSSL.com automatically come with both domain.com and www.domain.com 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 *.domain.com that will normally also include domain.com -- this kind of cert can usually be used on as many servers as you need.
0
grahamnonweilerCommented:
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.
0

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
SSL / HTTPS

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.