Configuring SSL with multiple domains on same IP?

Currently I'm running Ubuntu 12.04.5 LTS with Apache2

I want to configure SSL (I'm going to install and use OpenSSL) to work with only one of my virtual hosts. Specifically a sub domain.

So I want the 3 other domains currently hosted on this same server and IP to remain http://

I also want the top domain http://www.mydomain.com to remain a http://

but I want the sub domain to be https://www.sub.mydomain.com & https://sub.mydomain.com (Do I need to set it up for both www. and no www.? )

Does this require creating and using an .htaccess file for my subdomain due to having multiple virtual hosts on the same IP? Or can I configure settings for multiple virtual host domains through the main httpd.conf file(mine is currently blank)? Or should this be configured through the apache2.conf file?

Also in my apache2.conf file I don't see a section that I have seen mentioned in SSL tutorials. Should that be in there by default?

Should I also be setting up Server Name Indication (SNI) at this point in case I want to use different SSL certs on the different sites I'm hosting in the future?

Do I also need to edit my virtual host config file found in my apache2 sites-available directory so in this case my sub.mydomain.com.conf file? I have the sub domain set up as it's own virtual host at this point and so it's basically set up exactly like the other top domains.

What is the default-ssl file that is in my sites-available directory? Is that something I should be using when setting up SSL?

0 Replies

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct