Solved .htacess in LAMP App using LDAP Authentication
-
Hi there. I would like to use a .htaccess Protection in combination with the Cloudron LDAP. If I didn't miss it, the necessary modules are not loaded by the Apache config of the LAMP app. Would it be possible to active them?
Best
RoboMod -
This will not really work, as the LAMP app also does not specify any authentication addons in the manifest like https://docs.cloudron.io/packaging/addons/#ldap to have access to the LDAP server.
For this probably a custom fork of the LAMP app is doable to add the
ldap
module and also install the required apache modules then.The package repo can be found at https://git.cloudron.io/cloudron/lamp-app
-
nebulon
-
-
@girish Wuhu! Thats nice. Would you be willing to activate it in the next release or so? (I'm not sure which modules it would require exactly. But I could search them.)
-
@RoboMod You mean activate the ldap module in apache?
-
@girish Yes, exactly. I think the necessary modules would be:
LoadModule ldap_module /path/to/mod_ldap.so LoadModule authnz_ldap_module /path/to/mod_authnz_ldap.so
But I'm not 100% sure
-
@RoboMod In the latest package, I enabled the apache ldap modules. The config below works for me:
<Directory /app/data/public> Options +FollowSymLinks AllowOverride None Require valid-user AuthName "Cloudron LDAP Authentication" AuthBasicProvider ldap AuthType Basic AuthLDAPURL ${CLOUDRON_LDAP_URL}/${CLOUDRON_LDAP_USERS_BASE_DN}?username?sub?(username=*) AuthLDAPBindDN ${CLOUDRON_LDAP_BIND_DN} AuthLDAPBindPassword ${CLOUDRON_LDAP_BIND_PASSWORD} </Directory>
Also, documented in https://docs.cloudron.io/apps/lamp/#ldap
-
@girish That works great! Many many thanks for you prompt support!
-
nebulon
-
nebulon