Set SSL for custom domains with CNAME

Hi there,
I'm new in all this and I work for a company that has a project hosted on Linode.
Here's what we have:
-two linodes(MyCentOS 7) behin a nodebalancer.
-wildcart SSL installed from linode user interface on the nodebalancer. Wildcart because all of our clients have their own subdomain when accessing the product: https://customersubdomain.ourdomain.com

Here's what we need to do:

  • Our clients are asking for custom domains so that they wont have our domain in the link like for example: sales.customerdomain.com load https://customersubdomain.ourdomain.com
  • We ask them to configure a CNAME to point their link to their subodomain on our system.

Here's the question:

  1. How can we install Letsencrypt SSL certificates for them so that their sales.customerdomain.com become a https connection?
  2. Can we add multiple SSL on the nodebalancer?
  3. Can this be done from code(php) when they configure their custom domain link in our system?

1 Reply

Hey there,

We're happy to try and help with this.

How can we install Letsencrypt SSL certificates for them so that their sales.customerdomain.com become a https connection?

To secure all subdomains of your domain, you will need to get a wildcard certificate set up. With this configured, they'll acquire an https connection when they are redirected to the sub domain from the customer domain.

For https to be available on the customer subdomain before being redirected, you'll need to use individual ssl certificates for their domain using virtual hosts.

Can we add multiple SSL on the nodebalancer?

You aren't able to add multiple SSL to the nodebalancer itself, but you can change the Nodebalancer protocol to TCP and allow https traffic to terminate on the backend.

Can this be done from code(php) when they configure their custom domain link in our system?

You'll need edit your virtual host directory to ensure that the following block is included for all domains so their individual files and keys are used:

For Apache-

<VirtualHost *:443>
   ServerName www.example2.com
   DocumentRoot /var/www/example2
   SSLEngine on
   SSLCertificateFile /path/to/www_example2_com.crt
   SSLCertificateKeyFile /path/to/www_example2_com.key
   SSLCertificateChainFile /path/to/DigiCertCA2.crt
</VirtualHost>

for Nginx-

server  {
        listen   443;
        server_name example2.org;

        root /usr/share/nginx/www;
        index index.html index.htm;

        ssl on;
        ssl_certificate /etc/nginx/ssl/example2.org/server.crt;
        ssl_certificate_key /etc/nginx/ssl/example2.org/server.key;
      }

We hope that helps!

Sincerely,
Tara T
Linode Support Team

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