Plesk (11) – Redirect Webmail to HTTPS

By default the webmail interfaces of Plesk is running unsecured on port 80.┬áThat’s bad, really bad (Shame on you Parallels!).

There are some guides out there to fix that, but they are all wrong in my eyes. Some are made for old releases, others are changing stuff in files which are overwritten on update or regeneration of config files.

But there’s a very simple way to do it. Plesk includes the config files for webmail from a directory using a common Apache Include. So, simply add an additional conf file and place a rewrite rule to https there.┬áThis works fine for Plesk 11.

On CentOS (location may is a bit different on other systems) create a new file “/etc/httpd/conf/plesk.conf.d/webmails/horde/1_ssl_redirect.conf”, and add this content:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Because Plesk also supports two other webmails, copy the file to the directories “atmail” and “roundcube” (or add a symlink).

Now restart Apache and enjoy.

I tested it myself with Horde and Atmail, but not Roundcube.

This entry was posted in Apache, CentOS, Linux, Plesk. Bookmark the permalink.

3 Responses to Plesk (11) – Redirect Webmail to HTTPS

Leave a Reply

Your email address will not be published. Required fields are marked *