Roundcube redirect

Discussion in 'Installation/Configuration' started by Jonathan E. Emmett, Mar 10, 2017.

  1. Jonathan E. Emmett

    Jonathan E. Emmett New Member

  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    What OS? I believe the debian roundcube package sets up /roundcube globally so it would work on all your sites. I just created a redirect from /webmail to the control panel's hostname, so that you never have ssl certificate warnings (not a problem if all your sites have ssl setup, but not all of ours do, so this was our solution):
    # cat /etc/apache2/conf-enabled/webmail.conf 
    # This makes the 'webmail.*' convenience hostname work on each domain.
    # We redirect to the local server's hostname to avoid SSL errors.
    <If "%{HTTP_HOST} =~ /^(webmail|roundcube)\./">
        RedirectMatch permanent "(.*)"
    # Same for /webmail paths
    RedirectMatch permanent "^/webmail(/.*)?$"
    <Directory /var/lib/roundcube/>
        <IfModule mod_headers.c>
            Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
            Header always set X-Content-Type-Options: nosniff
            Header always set X-Frame-Options: SAMEORIGIN
            Header always set X-XSS-Protection: "1; mode=block"
            Header unset Content-Security-Policy
            Header add Content-Security-Policy "default-src https: 'unsafe-inline' 'unsafe-eval';connect-src https: wss:"
            Header always edit Set-Cookie (.*) "$1; HTTPOnly; Secure"
  3. wshakes

    wshakes Member

Share This Page