Installing SSL SAN certificate

shacker23

Well-Known Member
Feb 20, 2005
263
1
168
We have the following setup:

Account "foo" with a primary domain and an "intranet." subdomain, both on the same IP (obviously, since that's a cPanel limitation). We have been issued an SSL SAN certificate which should cover both the domain and the subdomain (both will need https protection in places). Since they're both on the same IP, the certificate should cover both just fine.

We temporarily installed a self-signed cert on the intranet subdomain. Now we want to install the real cert so that it covers both domains.

What is the correct procedure for this?

Thanks.
 

shacker23

Well-Known Member
Feb 20, 2005
263
1
168
Hi Tristan - Essentially, yes, though I'm no expert on this. From the FAQ:

Does this system have the capability to do Subject Alternative Name (SAN) certificates where we can use one certificate with multiple DNS hostnames per IP address?

Yes, the following types of certificates are supported [note: EV certs coming March 3, 2011]: Comodo EV SGC SSL (EV/SAN), Comodo EV Multi Domain SSL, InCommon Wildcard SSL Certificate, InCommon SSL, InCommon Intranet SSL (secure internal servers using either a full server name or a private IP address), InCommon Unified Communications Certificate (UCC/SAN), InCommon Multi Domain SSL, Corporate Secure Email Certificate.
https://wikihub.berkeley.edu/display/calnet/CalNet+InCommon-Comodo+Certificate+Service
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
35
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Does the account have a dedicated IP or it is using the shared IP? If it is a dedicated IP, simply install that new certificate in WHM > SSL/TLS > Install a SSL Certificate and Setup the Domain area.

If you wish to remove the prior certificate, you could remove it in WHM > SSL/TLS > Manage SSL Hosts area. Please ensure to have the CSR, key, crt and cabundle files before removing the existing certificate.

After installation, ensure to copy the /var/cpanel/userdata/username/domain.com_SSL file to /var/cpanel/userdata/username/intranet.domain.com_SSL location and revise as appropriate for the home directory path. After revising, you would then rebuild Apache and restart it:

Code:
cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak110922
/scripts/rebuildhttpdconf
/etc/init.d/httpd restart
 

shacker23

Well-Known Member
Feb 20, 2005
263
1
168
Thanks for this response Tristan. What I'm seeing when running rebuildhttpdconf is this:

warn [rebuildhttpdconf] Failed to resolve duplicate SSL VirtualHosts: intranet.domain.edu_SSL and domain.edu_SSL
Built /usr/local/apache/conf/httpd.conf OK

After restarting apache, the site is not available. I modified the documentroot, the homediar, the serveralias and the servername.

Any ideas there? Thanks.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
35
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Which site is not available? Both sites or just one of them, and by not available do you mean on http or https or both? Also, do they have entries in /usr/local/apache/conf/httpd.conf for the 443?

Also, you should compare the settings in intranet.domain.edu to what you put into intranet.domain.edu_SSL to ensure they match for those options. If they do not match, revise the intranet.domain.edu_SSL to match those of intranet.domain.edu rather than what you previously used.
 

shacker23

Well-Known Member
Feb 20, 2005
263
1
168
Ah, I didn't look at the file intranet.domain.edu. Will follow up on this tomorrow. Thanks.
 

shacker23

Well-Known Member
Feb 20, 2005
263
1
168
Thanks Tristan! That did the trick - had to modify both files to have unique homedirs and other identifying data, while leaving the path to the cert and key files identical. Wonderful - one cert covering two domains on the same IP, like magic.

Note for others: the rebuild step still issues the warning:

warn [rebuildhttpdconf] Failed to resolve duplicate SSL VirtualHosts: intanet.domain.edu_SSL and domain.edu_SSL

but after restarting apache, it does work just fine.

Would be nice to see WHM make this a bit easier to configure, though it's probably not a very common use case.

I appreciate your help.

./s
 
Last edited: