Plesk -> Tools & Settings -> SSL Certificates
Plesk -> Tools & Settings -> Database Servers -> PHPMyAdmin -> psa -> certificates
SSLCertificateKeyFile "/opt/psa/var/certificates/cert-name"
SSLCertificateFile "/opt/psa/var/certificates/cert-name"
SSLCACertificateFile "/opt/psa/var/certificates/cert-name"
ssl_certificate /opt/psa/var/certificates/cert-name;
ssl_certificate_key /opt/psa/var/certificates/cert-name;
ssl_client_certificate /opt/psa/var/certificates/cert-name;
/opt/psa/admin/conf/templates/default
/opt/psa/admin/conf/templates/custom
What I do is install my webmail certificate in
And then go to
Get the file names for the webmail cert and make a custom horde and roundcube templates* with..
Apache files (horde.php and roundcube.php)
Code:SSLCertificateKeyFile "/opt/psa/var/certificates/cert-name" SSLCertificateFile "/opt/psa/var/certificates/cert-name" SSLCACertificateFile "/opt/psa/var/certificates/cert-name"
Nginx File (nginxWebmailPartial.php)
Code:ssl_certificate /opt/psa/var/certificates/cert-name; ssl_certificate_key /opt/psa/var/certificates/cert-name; ssl_client_certificate /opt/psa/var/certificates/cert-name;
I do this because the CA directives are missing from the default Apache2 templates.
Oh btw the above paths are for Ubuntu if on CentOS I think the psa folder is in /usr/local/.
*Templates are located in
copy the above files to
and then edit.
Once you have done that send you customers to correct url (that your SSL is for) so they don't get any certificate warnings. And if you check your url at ssllabs you won't get any chain issues.
What we need is a button is SSL Certs to "secure webmail" like we have for plesk!
I hope that helps.
Kind regards
Lloyd
/opt/psa/admin/conf/templates/default/horde.php
/opt/psa/admin/conf/templates/default/roundcube.php
/opt/psa/admin/conf/templates/default/nginxWebmailPartial.php
/opt/psa/admin/conf/templates/custom
/opt/psa/admin/conf/templates/custom/horde.php
/opt/psa/admin/conf/templates/custom/roundcube.php
/opt/psa/admin/conf/templates/custom/nginxWebmailPartial.php
/opt/psa/admin/bin/httpdmng --reconfigure-all
After making the changes should I be running a command like:
/usr/local/psa/admin/bin/httpdmng ––reconfigure-all
Yeah that's right, I haven't found one that just does the webmail domain.
SSLCertificateFile "<?php echo $ipAddress->sslCertificate->ceFilePath ?>"
<?php if ($OPT['ssl']): ?>
<?php $sslCertificate = $ipAddress->sslCertificate; ?>
<?php if ($sslCertificate->ce): ?>
ssl_certificate <?php echo $sslCertificate->ceFilePath ?>;
ssl_certificate_key <?php echo $sslCertificate->ceFilePath ?>;
<?php if ($sslCertificate->ca): ?>
ssl_client_certificate <?php echo $sslCertificate->caFilePath ?>;
<?php endif ?>
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
<?php endif ?>
<?php endif ?>
<?php if ($OPT['ssl']): ?>
ssl_certificate /opt/psa/var/certificates/cert-name;
ssl_certificate_key /opt/psa/var/certificates/cert-name;
ssl_client_certificate /opt/psa/var/certificates/cert-name;
ssl_session_timeout 5m;
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
<?php endif ?>
Ric878 am sorry for hijacking ur thread
Lloyd I have done it the ssl seems to be working but how can force https on the webmail.
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
Thank you for the kind reply,
It's working but the problem is I have two domains hosted .. now the other domain's webmail.domainname.com shows the ssl for the one Installed .. I don't think we have individual options to secure the webmail domains.
No probs, glad I can help.
The horde.php file around line 83 is
Code:SSLCertificateFile "<?php echo $ipAddress->sslCertificate->ceFilePath ?>"
That needs to be replaced with the 3 directives I mention above.
The roundcube.php file around line 86, same thing.
And the nginxWebmailPartial.php lines 12, 13 and 15. are the lines/directives you want to look for.
I Completely remove lines 10 to 22 in and replace it...
Code:<?php if ($OPT['ssl']): ?> <?php $sslCertificate = $ipAddress->sslCertificate; ?> <?php if ($sslCertificate->ce): ?> ssl_certificate <?php echo $sslCertificate->ceFilePath ?>; ssl_certificate_key <?php echo $sslCertificate->ceFilePath ?>; <?php if ($sslCertificate->ca): ?> ssl_client_certificate <?php echo $sslCertificate->caFilePath ?>; <?php endif ?> ssl_session_timeout 5m; ssl_protocols SSLv2 SSLv3 TLSv1; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; <?php endif ?> <?php endif ?>
Goes to something like..
Code:<?php if ($OPT['ssl']): ?> ssl_certificate /opt/psa/var/certificates/cert-name; ssl_certificate_key /opt/psa/var/certificates/cert-name; ssl_client_certificate /opt/psa/var/certificates/cert-name; ssl_session_timeout 5m; ssl_prefer_server_ciphers on; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers HIGH:!aNULL:!MD5; <?php endif ?>
You can add HSTS, OCSP, ssl_session_cache, ssl_ecdh_curve and dhparam in there too.
I hope that helps
Kind regards
Lloyd
<?php if ($OPT['ssl']): ?>
ssl_ecdh_curve secp384r1;
ssl_dhparam /etc/ssl/dh.pem;
ssl_certificate /opt/psa/var/certificates/cert-name;
ssl_certificate_key /opt/psa/var/certificates/cert-name;
ssl_client_certificate /opt/psa/var/certificates/ca-name;
ssl_session_timeout 5m;
ssl_session_cache shared:SSL:5m;
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH+aRSA+RC4:EECDH:EDH+aRSA:RC4:!aNULL:!eNULL;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
ssl_stapling on;
ssl_stapling_verify on;
ssl_trusted_certificate /etc/ssl/inter-and-ca-combined.pem;
resolver 8.8.4.4 8.8.8.8 valid=300s;
resolver_timeout 10s;
<?php endif ?>
/etc/apache2/plesk.conf.d/horde.conf
/etc/apache2/plesk.conf.d/roundcube.conf
/etc/nginx/plesk.conf.d/webmail.conf
SSLEngine on
SSLVerifyClient none
SSLCertificateKeyFile "/usr/local/psa/var/certificates/private.key"
SSLCertificateFile "/usr/local/psa/var/certificates/certificate.crt"
SSLCACertificateFile "/usr/local/psa/var/certificates/ca.crt"
/usr/local/psa/admin/bin/httpdmng --reconfigure-all Execution failed.
Command: httpdmng
Arguments: Array
(
[0] => --reconfigure-server
[1] => -no-restart
)
Details: [2014-08-04 16:54:43] ERR [util_exec] proc_close() failed
[2014-08-04 16:54:44] ERR [panel] Apache config (14071505830.14904200) generation failed: Template_Exception: nginx: [emerg] "ssl_certificate" directive is duplicate in /etc/nginx/plesk.conf.d/webmail.conf:16
nginx: configuration file /etc/nginx/nginx.conf test failed
file: /usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 75
code: 0
nginx: [emerg] "ssl_certificate" directive is duplicate in /etc/nginx/plesk.conf.d/webmail.conf:16
nginx: configuration file /etc/nginx/nginx.conf test failed