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

  1. finderX says:

    In
    “/usr/local/psa/admin/conf/templates/custom/domainWebmail.php”
    (copied from “/usr/local/psa/admin/conf/templates/default/domainWebmail.php”)
    add this content in the end. This work only with Apache as backend.

    Thanks for post.

  2. Adrian says:

    Anyother way: You can change the settings for your Apache webserver within Plesk with proxypass. 😉

Leave a Reply

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