1 (edited by derek1776 2021-12-18 00:56:26)

Topic: Anyone running roundcube webmail behind a caddy reverse proxy?

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Had too much trouble using nginx to reverse proxy a node.js app, so had to give up. Got it working behind a caddy reverse proxy along with my nextcloud instance and a few other websites.  Now I am trying to access rouncube webmail, but it does not load,  just gives me a blank screen.  Before reinventing the wheel a third time, thought I would ask the forum. 

I have just a simple:
mail.mydomain.com/mail {
        reverse_proxy x.x.1.230:443
}

with 1.230 being my iRedMail node.  If I happen to get this working, I will share the notes.  Thanks!

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Anyone running roundcube webmail behind a caddy reverse proxy?

Just in the event anyone else runs into issues doing reverse proxy in front of the webmail client, here is what worked for me and is the correct syntax for a Caddyfile.

```
mail.example.com {
        reverse_proxy https://192.168.1.230 {
                transport http {
                        tls_server_name mail.example.com
                }
                header_up Host {upstream_hostport}
                header_up X-Forwarded-Host {host}
        }
}
```

3

Re: Anyone running roundcube webmail behind a caddy reverse proxy?

Thanks for sharing. smile