H
Highland
Guest
I got tired of Plesk 8's inability to properly assign a SSL certificate so I have a workaround for those of you who want one. This fix works for both subdomains and base TLDs.
1. Add your SSL certificate to Plesk. Make sure it is properly installed and recognized by Plesk. Also be sure your domain/subdomain is enabled for SSL.
2.Do the following in SSH
Take note of the file with today's date and copy it (to copy in Putty just highlight it). Paste this somewhere for now (I opened Notepad)
3. Go to /var/www/vhosts/domains.com/conf and open httpd.include in your text editor. Find the section that describes your domain or subdomain. It will start with
4. Head over to your /etc/httpd/conf.d directory. Make a file name like z0-subdomain.conf You can name it whatever you like provided you have the z0 at the start and a .conf extension. It needs to be loaded last but before zz010_psa_httpd.conf
5. Paste your block from step 3 into this file using a text editor. Once it's pasted look for this line
6. Restart apache.
1. Add your SSL certificate to Plesk. Make sure it is properly installed and recognized by Plesk. Also be sure your domain/subdomain is enabled for SSL.
2.Do the following in SSH
Code:
#ls -la /usr/local/psa/var/certificates
3. Go to /var/www/vhosts/domains.com/conf and open httpd.include in your text editor. Find the section that describes your domain or subdomain. It will start with
Copy everything between (and including) the <IfModule mod_ssl.c> tags.<VirtualHost XX.XX.XX.XX:443>
ServerName sub.domain.com:443
4. Head over to your /etc/httpd/conf.d directory. Make a file name like z0-subdomain.conf You can name it whatever you like provided you have the z0 at the start and a .conf extension. It needs to be loaded last but before zz010_psa_httpd.conf
5. Paste your block from step 3 into this file using a text editor. Once it's pasted look for this line
This is the file that currently loads when you go to https://sub.domain.com. Remember your file copy I told you to paste from step 2? Copy that and paste it over the certxxxxxx file name. Save your file.SSLCertificateFile /usr/local/psa/var/certificates/certxxxxxx
6. Restart apache.
if you've done this correctly Apache should restart with no errors and your SSL cert should be the one you added in step 1. If Apache fails to restart check the file and make sure you copied everything and that all the tags have matching closing tags.#service httpd restart