# Accessing Roundcube on / instead /mail

**URL:** <https://discourse.mailinabox.email/t/accessing-roundcube-on-instead-mail/9283>\
**Category:** Unsupported Modifications\
**Created:** [July 2, 2022, 5:15pm UTC](https://discourse.mailinabox.email/t/accessing-roundcube-on-instead-mail/9283 "2022-07-02T17:15:10Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Winux](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/w/cc9497/32.png) [@Winux](https://discourse.mailinabox.email/u/Winux)\
**Post date:** [July 2, 2022, 5:15pm UTC](https://discourse.mailinabox.email/t/accessing-roundcube-on-instead-mail/9283/1 "2022-07-02T17:15:11Z")

</div>

Hello,

I know this is an unsupported modification but how to modify and convert this snippet to yml format to serve roundcube at [box.example.com](http://box.example.com) instead of [box.example.com/mail](http://box.example.com/mail) ?

```auto
 # Roundcube Webmail configuration.
        rewrite ^/mail$ /mail/ redirect;
        rewrite ^/mail/$ /mail/index.php;
        location / {
                index index.php;
                alias /usr/local/lib/roundcubemail/;
        }
        location ~ /mail/config/.* {
                # A ~-style location is needed to give this precedence over the next block.
                return 403;
        }
        location ~ /mail/.*\.php {
                # note: ~ has precendence over a regular location block
                include fastcgi_params;
                fastcgi_split_path_info ^/mail(/.*)()$;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME /usr/local/lib/roundcubemail/$fastcgi_script_name;
                fastcgi_pass php-fpm;

                # Outgoing mail also goes through this endpoint, so increase the maximum
                # file upload limit to match the corresponding Postfix limit.
                client_max_body_size 128M;

```

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![stylnchris](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/stylnchris/32/2189_2.png) [@stylnchris](https://discourse.mailinabox.email/u/stylnchris)\
**Post date:** [July 2, 2022, 9:15pm UTC](https://discourse.mailinabox.email/t/accessing-roundcube-on-instead-mail/9283/2 "2022-07-02T21:15:26Z")

</div>

I’m not so sure you want to do that. If its too much of a pain for users to access your mail server putting in the /mail at the end a simple script could be put here:

```auto
 /home/user-data/www/default/index.html

```

```auto
<html>
        <head>
                <meta http-equiv="refresh" content="0; URL='https://box.(insertyourdomainhere).com/mail'" />
        </head>
        <body>
                <h1>redirecting...</h1>
        </body>
</html>

```

---

<div class="post-metadata">

**Author:** ![Winux](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/w/cc9497/32.png) [@Winux](https://discourse.mailinabox.email/u/Winux)\
**Post date:** [July 3, 2022, 9:37am UTC](https://discourse.mailinabox.email/t/accessing-roundcube-on-instead-mail/9283/3 "2022-07-03T09:37:38Z")

</div>

Thanks for the reply!  
We are using this redirecting solution right now and I was just wondering if it would be possible to ‘strip’ /mail from the end of the URL because I sometimes get that users that it would look much ‘nicer’ without the /mail at the end. Do you have any idea?

---

<div class="post-metadata">

**Author:** ![stylnchris](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/stylnchris/32/2189_2.png) [@stylnchris](https://discourse.mailinabox.email/u/stylnchris)\
**Post date:** [July 3, 2022, 2:02pm UTC](https://discourse.mailinabox.email/t/accessing-roundcube-on-instead-mail/9283/4 "2022-07-03T14:02:43Z")

</div>

I haven’t tried it myself yet but seems this might be the answer?

> [@How to redirect or add domain to roundcube webmaill http address?](https://discourse.mailinabox.email/t/how-to-redirect-or-add-domain-to-roundcube-webmaill-http-address/69):
>
> I would like to have my base domain as well as the alias redirect to webmail. For example, [example.com/mail](http://example.com/mail) goes to roundcube but I would like to be able to go [example.com](http://example.com) as well go to roundcube. How do you do this? Do I change the nginx file in connf.d and do a rewrite rule? Any code would help.

keep in mind you might break access to things like nextcloud

---

<div class="post-metadata">

**Author:** ![Winux](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/w/cc9497/32.png) [@Winux](https://discourse.mailinabox.email/u/Winux)\
**Post date:** [July 4, 2022, 4:14am UTC](https://discourse.mailinabox.email/t/accessing-roundcube-on-instead-mail/9283/5 "2022-07-04T04:14:52Z")

</div>

I tried but unfortunately it didn’t work. After some digging I think I phrased my question in a wrong way. I would like to to access the webmail at [box.example.com](http://box.example.com) without /mail being visible in the address bar.

Do you have any idea?

---

<div class="post-metadata">

**Author:** ![miabuser](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/m/eb9ed0/32.png) [@miabuser](https://discourse.mailinabox.email/u/miabuser)\
**Post date:** [July 11, 2022, 7:00am UTC](https://discourse.mailinabox.email/t/accessing-roundcube-on-instead-mail/9283/6 "2022-07-11T07:00:19Z")

</div>

> [@Winux](#):
>
> URL because I sometimes get that users that it would look much ‘nicer’ without the /mail at the end. Do you have any idea?

Not sure, if there is an easy way to achieve that and especially if there is a way that does not break anything else and / or will get overwritten every time you upgrade your box. I would just tell them, that it’s no possible and that even Google does it like that… 😉

That’s what it looks like on Gmail:

```auto
https://mail.google.com/mail/u/0/#inbox

```

---

<div class="post-metadata">

**Author:** ![stylnchris](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/stylnchris/32/2189_2.png) [@stylnchris](https://discourse.mailinabox.email/u/stylnchris)\
**Post date:** [July 11, 2022, 1:09pm UTC](https://discourse.mailinabox.email/t/accessing-roundcube-on-instead-mail/9283/7 "2022-07-11T13:09:54Z")

</div>

I think it’s absolutely possible. I personally just don’t see any benefit in doing it. I’m fairly certain that nextcloud (which is used by roundcube for calendar and contacts) will also break. The Admin panel might break. There are just too many variables.

---

<div class="post-metadata">

**Author:** ![caylakpenguen](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/c/ce73a5/32.png) [@caylakpenguen](https://discourse.mailinabox.email/u/caylakpenguen)\
**Post date:** [January 17, 2024, 8:41pm UTC](https://discourse.mailinabox.email/t/accessing-roundcube-on-instead-mail/9283/8 "2024-01-17T20:41:10Z")

</div>

Instead of dealing with miab, I have a logical suggestion.  
Install rainloop webmail at [webmail.contoso.com](http://webmail.contoso.com).  
[webmail.contoso.com/?admin](http://webmail.contoso.com/?admin)

Add maib domains from .

[![](https://mutluresim.com/images/2024/01/17/nPe70C.png) ](https://mutluresim.com/images/2024/01/17/nPe70C.png)

Emails such as gmail outlook yandex and [mail.ru](http://mail.ru) are supported.

[![](https://mutluresim.com/images/2024/01/17/nPeVIi.png) ](https://mutluresim.com/images/2024/01/17/nPeVIi.png)

---

<div class="post-metadata">

**Author:** ![miabuser](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/m/eb9ed0/32.png) [@miabuser](https://discourse.mailinabox.email/u/miabuser)\
**Post date:** [January 18, 2024, 12:31pm UTC](https://discourse.mailinabox.email/t/accessing-roundcube-on-instead-mail/9283/9 "2024-01-18T12:31:45Z")

</div>

Yeah, sure, that’s perfectly logical. Why didn’t we realise that we could install and maintain a second webmail client just to make the URL look nicer 😉

Btw: You would be better off using [SnappyMail](https://snappymail.eu/) instead of Rainloop, as the latter no longer seems to be actively maintained. The last [commit](https://github.com/RainLoop/rainloop-webmail/commits/master/) was on August 31, 2022. SnappyMail on the other hand is actively maintained and even got new features in the meantime.

---

<div class="post-metadata">

**Author:** ![rgmhtt](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/r/ed655f/32.png) [@rgmhtt](https://discourse.mailinabox.email/u/rgmhtt)\
**Post date:** [May 20, 2025, 5:32pm UTC](https://discourse.mailinabox.email/t/accessing-roundcube-on-instead-mail/9283/10 "2025-05-20T17:32:42Z")

</div>

> [@stylnchris](#):
>
> I’m not so sure you want to do that. If its too much of a pain for users to access your mail server putting in the /mail at the end a simple script could be put here:
> 
> ```auto
> /home/user-data/www/default/index.html
> 
> ```
> 
> ```auto
> <html>
> <head>
> <meta http-equiv="refresh" content="0; URL='https://box.(insertyourdomainhere).com/mail'" />
> </head>
> <body>
> <h1>redirecting...</h1>
> </body>
> </html>
> 
> ```

I tried this change and restarted nginx

but I am still going to the “default” page of “this is mail-in-a-box”

How do I get the server to use this revised index.html?
