diff --git a/plinth/modules/ttrss/__init__.py b/plinth/modules/ttrss/__init__.py
index d6ec1327f..d58fc7512 100644
--- a/plinth/modules/ttrss/__init__.py
+++ b/plinth/modules/ttrss/__init__.py
@@ -27,7 +27,8 @@ _description = [
users_url=reverse_lazy('users:index')),
format_lazy(
_('When using a mobile or desktop application for Tiny Tiny RSS, use '
- 'the URL /tt-rss-app for connecting.'))
+ 'the URL /tt-rss or '
+ '/tt-rss-app for connecting.'))
]
@@ -36,7 +37,7 @@ class TTRSSApp(app_module.App):
app_id = 'ttrss'
- _version = 4
+ _version = 5
def __init__(self):
"""Create components for the app."""
diff --git a/plinth/modules/ttrss/data/etc/apache2/conf-available/tt-rss-plinth.conf b/plinth/modules/ttrss/data/etc/apache2/conf-available/tt-rss-plinth.conf
index b09d63c68..e5577eef5 100644
--- a/plinth/modules/ttrss/data/etc/apache2/conf-available/tt-rss-plinth.conf
+++ b/plinth/modules/ttrss/data/etc/apache2/conf-available/tt-rss-plinth.conf
@@ -6,10 +6,21 @@ Alias /tt-rss /usr/share/tt-rss/www
Alias /tt-rss-app /usr/share/tt-rss/www
- Include includes/freedombox-single-sign-on.conf
-
- TKTAuthToken "feed-reader" "admin"
-
+ # If a client sends 'Authorization' HTTP Header, perform Basic authorization
+ # using LDAP, otherwise redirect to FreedomBox single sign-on. It is not
+ # mandatory for the server to return HTTP 401 with 'WWW-Authenticate'. See
+ # https://datatracker.ietf.org/doc/html/rfc2616#section-14.8
+
+ Include includes/freedombox-auth-ldap.conf
+ Require ldap-group cn=admin,ou=groups,dc=thisbox
+ Require ldap-group cn=feed-reader,ou=groups,dc=thisbox
+
+
+ Include includes/freedombox-single-sign-on.conf
+
+ TKTAuthToken "feed-reader" "admin"
+
+
# URLs without further authentication. The URLs contain a unique key generated
@@ -19,6 +30,8 @@ Alias /tt-rss-app /usr/share/tt-rss/www
Require all granted
+# Legacy configuration for apps that expect a HTTP 401 response
+# 'WWW-Authenticate' header.
Include includes/freedombox-auth-ldap.conf
Require ldap-group cn=admin,ou=groups,dc=thisbox
diff --git a/plinth/modules/ttrss/privileged.py b/plinth/modules/ttrss/privileged.py
index 34778b596..abc2d7344 100644
--- a/plinth/modules/ttrss/privileged.py
+++ b/plinth/modules/ttrss/privileged.py
@@ -81,6 +81,8 @@ def setup():
if action_utils.service_is_enabled('tt-rss'):
action_utils.service_restart('tt-rss')
+ # Accommodate changes in Apache configuration file.
+ action_utils.service_reload('apache2')
@privileged