mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
syncthing: Update Apache configuration
- Redirect /syncthing to /syncthing/ as the daemon does not work without a slash at the end. - Create a separate include file for LDAP authentication configuration that can be included on other app configurations.
This commit is contained in:
parent
277cd45342
commit
3f57863a69
@ -1,13 +1,20 @@
|
||||
ProxyPass /syncthing/ http://localhost:8384/
|
||||
##
|
||||
## On all sites, provide syncthing web interface on a path: /syncthing
|
||||
##
|
||||
|
||||
<Location /syncthing/>
|
||||
ProxyPassReverse http://localhost:8384/
|
||||
AuthType basic
|
||||
AuthName "FreedomBox Login"
|
||||
AuthBasicProvider ldap
|
||||
AuthLDAPUrl "ldap:///ou=users,dc=thisbox?uid"
|
||||
AuthLDAPGroupAttribute memberUid
|
||||
AuthLDAPGroupAttributeIsDN off
|
||||
Require valid-user
|
||||
# Redirect /syncthing to /syncthing/ as the Syncthing server does not
|
||||
# work without a slash at the end.
|
||||
<Location /syncthing>
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_URI} ^/syncthing$
|
||||
RewriteRule .* /syncthing/ [R=301,L]
|
||||
</IfModule>
|
||||
</Location>
|
||||
|
||||
<Location /syncthing/>
|
||||
ProxyPass http://localhost:8384/
|
||||
|
||||
Include includes/freedombox-auth-ldap.conf
|
||||
Require ldap-group cn=admin,ou=groups,dc=thisbox
|
||||
</Location>
|
||||
|
||||
6
data/etc/apache2/includes/freedombox-auth-ldap.conf
Normal file
6
data/etc/apache2/includes/freedombox-auth-ldap.conf
Normal file
@ -0,0 +1,6 @@
|
||||
AuthType basic
|
||||
AuthName "FreedomBox Login"
|
||||
AuthBasicProvider ldap
|
||||
AuthLDAPUrl "ldap:///ou=users,dc=thisbox?uid"
|
||||
AuthLDAPGroupAttribute memberUid
|
||||
AuthLDAPGroupAttributeIsDN off
|
||||
2
setup.py
2
setup.py
@ -209,6 +209,8 @@ setuptools.setup(
|
||||
glob.glob('data/etc/apache2/conf-available/*.conf')),
|
||||
('/etc/apache2/sites-available',
|
||||
glob.glob('data/etc/apache2/sites-available/*.conf')),
|
||||
('/etc/apache2/includes',
|
||||
glob.glob('data/etc/apache2/includes/*.conf')),
|
||||
('/etc/ikiwiki',
|
||||
glob.glob('data/etc/ikiwiki/*.setup')),
|
||||
('/etc/NetworkManager/dispatcher.d/',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user