mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +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/>
|
# Redirect /syncthing to /syncthing/ as the Syncthing server does not
|
||||||
ProxyPassReverse http://localhost:8384/
|
# work without a slash at the end.
|
||||||
AuthType basic
|
<Location /syncthing>
|
||||||
AuthName "FreedomBox Login"
|
<IfModule mod_rewrite.c>
|
||||||
AuthBasicProvider ldap
|
RewriteEngine On
|
||||||
AuthLDAPUrl "ldap:///ou=users,dc=thisbox?uid"
|
RewriteCond %{REQUEST_URI} ^/syncthing$
|
||||||
AuthLDAPGroupAttribute memberUid
|
RewriteRule .* /syncthing/ [R=301,L]
|
||||||
AuthLDAPGroupAttributeIsDN off
|
</IfModule>
|
||||||
Require valid-user
|
|
||||||
</Location>
|
</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')),
|
glob.glob('data/etc/apache2/conf-available/*.conf')),
|
||||||
('/etc/apache2/sites-available',
|
('/etc/apache2/sites-available',
|
||||||
glob.glob('data/etc/apache2/sites-available/*.conf')),
|
glob.glob('data/etc/apache2/sites-available/*.conf')),
|
||||||
|
('/etc/apache2/includes',
|
||||||
|
glob.glob('data/etc/apache2/includes/*.conf')),
|
||||||
('/etc/ikiwiki',
|
('/etc/ikiwiki',
|
||||||
glob.glob('data/etc/ikiwiki/*.setup')),
|
glob.glob('data/etc/ikiwiki/*.setup')),
|
||||||
('/etc/NetworkManager/dispatcher.d/',
|
('/etc/NetworkManager/dispatcher.d/',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user