From f950ce98ab07d6095b5f603cff364725b36b485f Mon Sep 17 00:00:00 2001 From: Unrud Date: Sun, 16 Aug 2020 18:14:43 +0200 Subject: [PATCH] Add reverse proxy examples for Apache .htaccess --- DOCUMENTATION.md | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 697a3ea..590da9f 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -348,10 +348,21 @@ RewriteRule ^/radicale$ /radicale/ [R,L] ProxyPass http://localhost:5232/ retry=0 ProxyPassReverse http://localhost:5232/ - RequestHeader set X-Script-Name /radicale/ + RequestHeader set X-Script-Name /radicale ``` +Example **Apache .htaccess** configuration: + +```apache +DirectoryIndex disabled +RewriteEngine On +RewriteRule ^(.*)$ http://localhost:5232/$1 [P,L] + +# Set to directory of .htaccess file: +RequestHeader set X-Script-Name /radicale +``` + Be reminded that Radicale's default configuration enforces limits on the maximum number of parallel connections, the maximum file size and the rate of incorrect authentication attempts. Connections are terminated after a timeout. @@ -384,18 +395,35 @@ RewriteEngine On RewriteRule ^/radicale$ /radicale/ [R,L] - AuthType Basic - AuthName "Radicale - Password Required" - AuthUserFile "/etc/radicale/htpasswd" - Require valid-user + AuthType Basic + AuthName "Radicale - Password Required" + AuthUserFile "/etc/radicale/htpasswd" + Require valid-user ProxyPass http://localhost:5232/ retry=0 ProxyPassReverse http://localhost:5232/ - RequestHeader set X-Script-Name /radicale/ + RequestHeader set X-Script-Name /radicale RequestHeader set X-Remote-User expr=%{REMOTE_USER} ``` +Example **Apache .htaccess** configuration: + +```apache +DirectoryIndex disabled +RewriteEngine On +RewriteRule ^(.*)$ http://localhost:5232/$1 [P,L] + +AuthType Basic +AuthName "Radicale - Password Required" +AuthUserFile "/etc/radicale/htpasswd" +Require valid-user + +# Set to directory of .htaccess file: +RequestHeader set X-Script-Name /radicale +RequestHeader set X-Remote-User expr=%{REMOTE_USER} +``` + > **Security:** Untrusted clients should not be able to access the Radicale > server directly. Otherwise, they can authenticate as any user.