More and more sites are only available via https, now with the Let’s Encrypt extension available in Plesk 12.5 it’s even easier to make your site secure. As such I thought it would be a good time to write this guide.
This guide assumes…
You have already setup your SSL Certificate in Plesk for your domain,
You are using Apache (FastCGI or FPM) and Nginx is serving static files,
You want your site to be https only, redirecting all http requests to https
You have set preferred domain in Plesk to www.domain.tld
Apache
I’ll start with Apache, browse to your domain in Plesk and click on Additional Apache & Nginx settings. under Additional directives for HTTP use this redirect..
If you use Plesk’s built in SEO Safe redirect (preferred domain) from domain.tld to www.domain.tld, you will need to turn this off and add the following in the Additional HTTPS directives…
Notice I’m using $scheme rather than the more common $host, as using the $host rewrite affected ssllabs scores in that domain.tld and www.domain.tld would score differently after adding HPKP and HSTS headers in Apache.
I hope that helps someone.
Updated to reflect changes at: https://hstspreload.org/
You can fix Logjam for the Plesk Panel by simply adding the standard Nginx dhparam directive to the plesk.conf file.
Very similar to previous posts on adding OCSP and HSTS to Plesk.
First you will need to create your dhparam, you can follow my guide Creating DH Parameters, and then locate the file and edit with your favourite editor…
Plesk Server .conf
1
/etc/sw-cp-server/conf.d/plesk.conf
And add the Nginx ssl_dhparam directive above the certificate entries like so…
Here’s how I install SSL certificates for Horde and Roundcube bundled with Plesk 12.0.18 to remove chain issues, and keep the certificate in scope of Plesk backups.
Get the file names for the webmail certificate and CA certificate and make a custom horde and roundcube template (paths to follow) adding the following directives.
You can see I have also added ssl_session_cache in there along with HSTS, OCSP, dhparam and ECDH Curve.
Now regenerate the conf files with…
1
/opt/psa/admin/bin/httpdmng--reconfigure-all
Your webmail will now be properly secured and you won’t get any chain issues when testing your site at ssllabs.
Please note CentOS paths are different. The psa folder is located in /usr/local/.
Thanks for reading, I am working on formatting this article better so you can copy and paste directives like previous guides, unfortunately the code tags wouldn’t wrap the above php sections.