linein designs

19 Jun, 2010

How to Install SSL Certificate on a Subdomain within Plesk 9

Posted by: john In: apache|plesk|tutorial

1. Add your subdomain
You can do this as a normal subdomain or as a standalone domain.

2. Add your certificate to Plesk
Use the Plesk control panel to add your certificate. Where the shortcoming comes into play is that Plesk will continue to use the default certificate.

3. Find your certificate
Head over to /usr/local/psa/var/certificates

Take note of the file name cert-xxxxxx that has today’s creation date. There may be two if you installed a CA certificate. You will need to determine which file is the normal certificate and which one is the CA one for the step 5.

4.Copy the include file
Go to /var/www/vhosts/sub.domain.com/conf and open the httpd.include file
Find where it has

ServerName sub.domain.com:443

Copy the entire VirtualHost block for JUST the SSL portion. (from <VirtualHost xx.xx.xx.xx:443> to </VirtualHost>)

5. Make your include file
Head over to /etc/httpd/conf.d and make a file. Call it something like z0-subdomain.conf. The file just needs to load after ssl.conf but before zz010_psa_httpd.conf. Paste what you copied from step 4 into the file and then set the certificate file names from step 3 into these following places.

SSLCertificateFile /usr/local/psa/var/certificates/cert-xxxxxx

If you have a CA certificate, you must also add this line just below:

SSLCACertificateFile /usr/local/psa/var/certificates/cert-xxxxxx

6. Restart Apache
service httpd restart

Most of these instructions were taking from this page, but they left the CA certificate step. This is very important since certain browsers do not trust all intermediate CA’s. (mostly Apple products and some cell phones)

Similar Posts:

Tags:

2 Comments »

Comment by Eugene Martin

Life saver mate

Cheers
Eugene

 
Comment by Chris Cookson

Found this very handy. It wasn’t quite what I was trying to do, but worked anyway.
I had a wildcard certificate for the domain the Plesk server uses, and wanted to set that as the SSL certificate for all hosted sites, so that I could provide SSL for all sites without having to obtain additional IP addresses for each one.

Using domain aliases, I could then refer to each site by its own domain for http traffic, and its subdomain of the server domain for https traffic.

I still haven’t worked out how to configure this globally, but these instructions have at least given me a way to configure individual subdomains.

 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.

Trackback responses to this post



Please Support Our Friends

Banner
FreshBooks

About

My name is John Veldboom and have been in design and web programing for just over 8 years now. Started off as a hobby in high school but it has developed into a full time job now. I always tell people that if I wasn't doing this at work each day, I would be at home doing it for free. I love it!

Please visit the contact page to drop me a message.