nbenedek b49afbc4ff
email: Redirect to the app page if roundcube isn't installed
If Roundcube is not yet installed and the user clicks on 'Launch web client',
redirect to the installation page instead of Apache's Not Found page.

Signed-off-by: nbenedek <contact@nbenedek.me>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-02-04 17:50:49 -08:00

37 lines
1.2 KiB
Plaintext

# Serve rspamd web UI:
# https://www.rspamd.com/doc/faq.html#how-to-use-the-webui-behind-a-proxy-server
<LocationMatch "^/rspamd$">
Redirect "/rspamd/"
</LocationMatch>
<Location "/rspamd/">
ProxyPass http://127.0.0.1:11334/
ProxyPassReverse http://127.0.0.1:11334/
# Don't add X-Forwarded* headers to make rspamd think that request is coming
# from localhost. This disables rspamd's password auth mechanism in favor of
# FreedomBox authentication and authorization below.
ProxyAddHeaders off
# Require SSO
Include includes/freedombox-single-sign-on.conf
<IfModule mod_auth_pubtkt.c>
TKTAuthToken "admin"
</IfModule>
</Location>
# Automatic configuration for clients like Thunderbird:
# https://wiki.mozilla.org/Thunderbird:Autoconfiguration#Implementation
<Location "/.well-known/autoconfig/mail/config-v1.1.xml">
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^ /plinth/apps/email/config.xml [PT]
</IfModule>
</Location>
# If Roundcube is not yet installed and the user clicks on 'Launch web client',
# redirect to the installation page instead of Apache's Not Found page.
<Location "/roundcube/">
ErrorDocument 404 /plinth/apps/roundcube/
</Location>