Browse Source

apache auth passed to tt-rss

it still uses htpasswd as authn backend; should move to postgresql
sooner or later
test auth, user=admin pass=password
boyska 5 years ago
parent
commit
54bcd8dbb8
5 changed files with 10 additions and 7 deletions
  1. 1 0
      docker-compose.yml
  2. 6 5
      docker/frontend-apache.conf
  3. 1 0
      docker/frontend-apache/passwords.txt
  4. 1 1
      docker/ttrss-config.php
  5. 1 1
      tt-rss

+ 1 - 0
docker-compose.yml

@@ -58,6 +58,7 @@ services:
         container_name: feedati_webserver
         volumes:
             - ./docker/frontend-apache.conf:/usr/local/apache2/conf/httpd.conf:ro
+            - ./docker/frontend-apache/:/etc/apache2/:ro
             - ./docker/frontend-login/:/var/www/login/:ro
         ports:
             - 80:80

+ 6 - 5
docker/frontend-apache.conf

@@ -10,7 +10,7 @@ LoadModule mime_module modules/mod_mime.so
 LoadModule log_config_module modules/mod_log_config.so
 LoadModule env_module modules/mod_env.so
 #LoadModule expires_module modules/mod_expires.so
-#LoadModule headers_module modules/mod_headers.so
+LoadModule headers_module modules/mod_headers.so
 #LoadModule setenvif_module modules/mod_setenvif.so
 #LoadModule remoteip_module modules/mod_remoteip.so
 LoadModule proxy_module modules/mod_proxy.so
@@ -31,8 +31,7 @@ LoadModule authn_file_module modules/mod_authn_file.so
 # LoadModule authn_dbm_module modules/mod_authn_dbm.so
 
 LoadModule macro_module modules/mod_macro.so
-
-#LoadModule rewrite_module modules/mod_rewrite.so
+LoadModule rewrite_module modules/mod_rewrite.so
 
 <IfModule unixd_module>
 #
@@ -101,7 +100,7 @@ ErrorLog /proc/self/fd/2
 # LogLevel: Control the number of messages logged to the error_log.
 # Possible values include: debug, info, notice, warn, error, crit,
 # alert, emerg.
-LogLevel warn
+LogLevel trace1
 
 <IfModule log_config_module>
     #
@@ -193,9 +192,11 @@ ProxyPreserveHost On
 <Location /tt-rss/>
 ProxyPass http://tt-rss/tt-rss/
 ProxyPassReverse http://tt-rss/tt-rss/
-
 Use Auth
 Require valid-user
+RewriteEngine on
+RewriteRule .* - [E=RU:%{LA-U:REMOTE_USER},NS]
+RequestHeader set X-Forwarded-User %{RU}e
 </Location>
 
 <Location /rss-bridge/>

+ 1 - 0
docker/frontend-apache/passwords.txt

@@ -0,0 +1 @@
+admin:$2y$05$tPaBuT/mWQCvfk1C12PmV.0Dz8kt0cY1jcD53OGCN26Y8dX2kRPs.

+ 1 - 1
docker/ttrss-config.php

@@ -175,7 +175,7 @@
 	// if you experience weird errors and tt-rss failing to start, blank pages
 	// after login, or content encoding errors, disable it.
 
-	define('PLUGINS', 'auth_internal, note');
+	define('PLUGINS', 'auth_proxy, note');
 	// Comma-separated list of plugins to load automatically for all users.
 	// System plugins have to be specified here. Please enable at least one
 	// authentication plugin here (auth_*).

+ 1 - 1
tt-rss

@@ -1 +1 @@
-Subproject commit c925f4e3fdad04442c5c2f542883dbd26c81cc23
+Subproject commit 7e1a483db2644f8da14c5ea6072ed55fcd75bcba