Applicable to:
- Plesk 12.5 for Linux
- Plesk 12.0 for Windows
- Plesk 12.0 for Linux
- Plesk 12.5 for Windows
Question
How to secure webmail with SSL certificate in Plesk 12.x?
Answer
The ability to protect webmail using SSL certificate was introduced in Plesk Onyx .
There is no any workaround for Plesk 12.x on Windows.
Workaround for Plesk 12.x on Linux.
Create the subdomain, configure its
DocumentRoot
path (the directory on the server where the web pages of a site are stored), then manually assign SSL certificate for the webmail. To manually assign SSL for webmail, edit its configuration file:
Note: The following solution applies to Roundcube webmail. In the case of Horde webmail, modify the
horde.conf
file.
-
Create a backup of the configuration file using the following command.
For RHEL/CentOS :
# cp -p /etc/httpd/conf/plesk.conf.d/roundcube.conf{,.conf_back}
For Debian/Ubuntu:
# cp -p /etc/apache2/plesk.conf.d/roundcube.conf{,.conf_back}
-
Modify the
ServerName
andSSLCertificateFile
directives in the configuration file. For example:ServerName webmail.example.com
SSLCertificateFile /full/path/to/the/certificate/file -
Restart the web server, depending on your operating system:
# service httpd restart
Or:
# /etc/init.d/apache2 restart
If it is required to redirect all webmails to one main webmail, it is possible to do using Apache rewrite rule:
-
Modify these files (for Horde and Roundcube):
/etc/httpd/conf/plesk.conf.d/roundcube.conf
/etc/httpd/conf/plesk.conf.d/horde.conf -
Add these lines with rewrite rule for Apache configuration (for example, before
<IfModule mod_fcgid.c>
):<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^webmail\\.(.+)$ [NC]
RewriteCond %{HTTP_HOST} !^webmail.example.com
RewriteRule ^(.*)$ http://webmail.example.com [R=301,L]
</IfModule>Note: webmail.example.com should be changed to the main webmail DNS name that will be used for redirecting.
-
Restart Apache
-
Check is it working properly.
-
If yes, modify Plesk custom templates to make sure that settings are not overwritten after upgrade according to the documentation .
Required files are
horde.php
androundcube.php
.
Comments
0 comments
Please sign in to leave a comment.