Access Mailbox From A Subdomain

@nate as @ibib said, the best option knowing we can’t use a .htaccess file (not apache installed) and the option of customizing /etc/nginx/conf.d/local.conf will force us to re-edit it each time we’ll upgrade MiaB then, the best way I see to achieve this is by using a custom /home/user-data/www/default/index.html file as follows:

<!DOCTYPE HTML>
<html lang="en-US">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="refresh" content="1;url=https://box.yourdomain.com/mail">
        <script type="text/javascript">
            window.location.href = "https://box.yourdomain.com/mail"
        </script>
        <title>Page Redirection</title>
    </head>
    <body>
        If you are not redirected automatically, follow this <a href='https://box.yourdomain.com/mail'>link to /mail</a>
    </body>
</html>
  • Edit it by replacing box.yourdomain.com by your own server_name.

  • Note we are using a meta, and a javascript redirections plus a link inside the index.html static file that should make the desired redirection to work well within any browser.

Hope this helps!

3 Likes