Add reverse proxy examples for Apache .htaccess

This commit is contained in:
Unrud 2020-08-16 18:14:43 +02:00
parent 03e7e209da
commit f950ce98ab

View File

@ -348,10 +348,21 @@ RewriteRule ^/radicale$ /radicale/ [R,L]
<Location "/radicale/"> <Location "/radicale/">
ProxyPass http://localhost:5232/ retry=0 ProxyPass http://localhost:5232/ retry=0
ProxyPassReverse http://localhost:5232/ ProxyPassReverse http://localhost:5232/
RequestHeader set X-Script-Name /radicale/ RequestHeader set X-Script-Name /radicale
</Location> </Location>
``` ```
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 Be reminded that Radicale's default configuration enforces limits on the
maximum number of parallel connections, the maximum file size and the rate of maximum number of parallel connections, the maximum file size and the rate of
incorrect authentication attempts. Connections are terminated after a timeout. incorrect authentication attempts. Connections are terminated after a timeout.
@ -391,11 +402,28 @@ RewriteRule ^/radicale$ /radicale/ [R,L]
ProxyPass http://localhost:5232/ retry=0 ProxyPass http://localhost:5232/ retry=0
ProxyPassReverse http://localhost:5232/ ProxyPassReverse http://localhost:5232/
RequestHeader set X-Script-Name /radicale/ RequestHeader set X-Script-Name /radicale
RequestHeader set X-Remote-User expr=%{REMOTE_USER} RequestHeader set X-Remote-User expr=%{REMOTE_USER}
</Location> </Location>
``` ```
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 > **Security:** Untrusted clients should not be able to access the Radicale
> server directly. Otherwise, they can authenticate as any user. > server directly. Otherwise, they can authenticate as any user.