Page 1 of 2 12 LastLast
Results 1 to 15 of 30

Thread: SSL certs wildcard domains across different hosts

  1. #1
    Member
    Join Date
    Jul 2009
    Posts
    102

    Question SSL certs wildcard domains across different hosts

    I have a number of hosts all in the same domain "name.company.tld" with 1 of them hosting the website for name.company.tld

    I would like to use 1 cert *.name.company to avoid having to get individual certs but was wondering if i can use the same cert across a number of hosts to both sign the host and some of the websites they host?

    All certs will be from the same CA but wanted to check before going further

  2. #2
    Member
    Join Date
    Jul 2009
    Posts
    102

    Default

    Is it just a matter of using the correct key when i go to install the certs across the different hosts and hosted site?

  3. #3
    Member
    Join Date
    May 2010
    Posts
    321

    Default

    Someone correct me if I'm wrong but, If a user wants SSL certificates, They must have there own dedicated IP for this to work ?

  4. #4
    Member
    Join Date
    Jul 2009
    Posts
    102

    Default

    Not sure but have dedicated ip addresses for hosts and the website

  5. #5
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default

    You can install a wildcard SSL onto the main shared IP, but it will end up installing as the user nobody and have to be manually modified to change it if you want to have additional subdomains on the SSL certificate.

    The modification would be in /var/cpanel/userdata/nobody location to copy the existing *.domain.com_SSL to /var/cpanel/userdata/username location (replacing username with the actual username for the domain account), then changing it to match the subdomain name and modifying the paths to the user and changing nobody to the username.

    Here's an example of what the /var/cpanel/userdata/nobody/*.mydomainisgreat.com_SSL file would look like that needs modified:

    Code:
    documentroot: /home/username/public_html
    group: nobody
    hascgi: 1
    homedir: /usr/local/apache/htdocs
    ip: #
    owner: root
    phpopenbasedirprotect: 0
    port: 443
    serveradmin: webmaster@mydomainisgreat.com
    serveralias: "*.mydomainisgreat.com"
    servername: "*.mydomainisgreat.com"
    ssl: 1
    sslcacertificatefile: /usr/share/ssl/certs/*.mydomainisgreat.com.cabundle
    sslcertificatefile: /usr/share/ssl/certs/*.mydomainisgreat.com.crt
    sslcertificatekeyfile: /usr/share/ssl/private/*.mydomainisgreat.com.key
    sslengine: 'on'
    usecanonicalname: 'Off'
    user: nobody
    The lines needing changed would be these:

    Code:
    group: nobody
    homedir: /usr/local/apache/htdocs
    user: nobody
    Sometimes, the documentroot: line also needs changed if it isn't pointing to that user's /home/username/public_html path.

    The nobody user would be changed to the username for the cPanel account with the subdomain, while the homedir would be /home/username instead.

    So, let's say you have pandas.mydomainisgreat.com as the subdomain needing the wildcard SSL on the great cPanel username account, you'd do:

    Code:
    cp /var/cpanel/userdata/nobody/*.mydomainisgreat.com_SSL /var/cpanel/userdata/great/pandas.mydomainisgreat.com_SSL
    Then in the copied file, you'd change it to the following:

    Code:
    documentroot: /home/great/public_html/pandas
    group: great
    hascgi: 1
    homedir: /home/great
    ip: PUT.IP.ADDRESS.HERE
    owner: root
    phpopenbasedirprotect: 0
    port: 443
    serveradmin: webmaster@mydomainisgreat.com
    serveralias: "www.pandas.mydomainisgreat.com"
    servername: "pandas.mydomainisgreat.com"
    ssl: 1
    sslcacertificatefile: /usr/share/ssl/certs/*.mydomainisgreat.com.cabundle
    sslcertificatefile: /usr/share/ssl/certs/*.mydomainisgreat.com.crt
    sslcertificatekeyfile: /usr/share/ssl/private/*.mydomainisgreat.com.key
    sslengine: 'on'
    usecanonicalname: 'Off'
    user: great
    At that point, you'd then save the file, copy Apache as a backup, rebuild Apache configuration and restart Apache:

    Code:
    cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak101013
    /scripts/rebuildhttpdconf
    /etc/init.d/httpd restart
    That's how you get a wildcard subdomain SSL certificate working on a shared IP when installed for the user nobody. You should then be able to do the same for any subdomains on that domain on other accounts so long as you modify the paths and user properly for each.
    Last edited by cPanelKeithS; 10-13-2010 at 11:43 PM. Reason: minor correction
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  6. #6
    Member
    Join Date
    Jul 2009
    Posts
    102

    Default

    When I create the SSL cert request using WHM "Generate a SSL Certificate and Signing Request" should i name the domain *.mydomain.tld or mydomain.tld so it will work across mydomain.tld and dom1.mydomain.tld ...domN.mydomain.tld ?

  7. #7
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default

    You should name it *.mydomain.tld for the CSR (Certificate and Signing Request) generation.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  8. #8
    Member
    Join Date
    Jul 2009
    Posts
    102

    Default

    And when I'm installing the *.mydomain.tld cert should I list the actual specific domain its applying
    e.g. enabling whm ssl access to dom1.mydomain.tld or leave it as *.mydomain.tld in the "domain this CRT is for" field

  9. #9
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default

    When you install the SSL onto the user nobody, you'll need to install it onto the wildcard as that first SSL needs to be owned by the wildcard and nobody. Subsequent SSLs for the various subdomains will then need to be manually installed using the method I detailed above.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  10. #10
    Member
    Join Date
    Jul 2009
    Posts
    102

    Default

    i probably mis-understood the instructions but they seem to be directed at sites that share the same IP address. I have/ will have separate IP addresses for host, domain and sub domains

    Apologies if I didn't pick it up correctly

  11. #11
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default

    If you will have different IPs for each domain, then you can install each in WHM using the subdomain name for each that will have their own SSL on their own IP for the wildcard SSL. The first SSL installation needs to be for the wildcard SSL itself, though, so you would need to install *.mydomain.tld first
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  12. #12
    Member
    Join Date
    Jul 2009
    Posts
    102

    Default

    So I would "install & setup the domain in these order
    1. *.mydomain.tld
    2. mydomain.tld
    3. dom1.mydomain.tld
    4. dom2.mydomain.tld
    5. ....


    Or is it recommended that *.mydomain.tld ssl be installed on the website mydomain.tld with the user nobody

  13. #13
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default

    You don't need to install it for the mydomain.tld website under the user nobody, you can simply install the wildcard first as the user nobody and then each subsequent SSL as its own user provided each has a different IP. This means that subdomains must be on their own account with their own IP for each in order to install them via WHM.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  14. #14
    Member
    Join Date
    Jul 2010
    Posts
    19

    Default Re: SSL certs wildcard domains across different hosts

    Okay, so I have been trying to follow along with this. Let me see if i've got it right...

    Ultimately we'll want to have SSL (https://) installed for a main domain and any subdomains. So, should we have created the initial SSL for the main domain as *.maindomain.tld instead of just maindomain.tld? That seems fine, but what if you didn't anticipate ever using a subdomain? Are we forced to reinstall a new SSL?

  15. #15
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default Re: SSL certs wildcard domains across different hosts

    If you are going to get a wildcard certificate, which inherently costs more than a regular SSL, you need to generate the CSR and key for *.maindomain.com rather than for maindomain.com before purchasing it. If you then later don't use it for any subdomains, you would still be able to use it on maindomain.com and www.maindomain.com

    If you didn't create the CSR and key for *.maindomain.com, then I suggest regenerating it prior to purchase.

    If you aren't actually going to use it on any subdomains, you might as well not purchase a wildcard SSL. As I mentioned, they cost more and the only reason to pay the additional costs would be if you are going to use it.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

Page 1 of 2 12 LastLast

Similar Threads

  1. SSL Certs on Addon Domains
    By pxhost in forum New User Questions
    Replies: 2
    Last Post: 01-07-2009, 01:53 PM
  2. SSL Certs
    By CTC in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 07-14-2007, 09:48 AM
  3. No ssl certs work on domains
    By Secret Agent in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 02-08-2006, 08:37 AM
  4. Wildcard hosts
    By clarocque in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 02-12-2005, 05:47 PM

Tags for this Thread