I would like to use the mod_auth capabilities of lighttpd with the LDAP backend (especially for WebDAV).
I tried setting it up yesterday, but it kept denying my authentication requests forever and only printed following messages to the log:
After checking out the source of http_auth.c I found out that if lighttpd wasn't compiled with the LDAP option, it would just deny the authentication, resulting in given error message. The output of lighttpd -V shows that LDAP support is missing (in current build: 184.108.40.206 - Nayla (revision 1349)).
Code: Select all
nas lighttpd: (http_auth.c.887) password doesn't match for / username: admin, IP: 172.17.xx.xxx
So I tried figuring out how I could solve that problem. I started setting up a proper build environment with a VM of FreeBSD 9.3-RELEASE, mostly based on http://wiki.nas4free.org/doku.php?id=do ... om_scratch, which is a bit outdated but if you know how to get the sources via SVN, it's half the battle.
Code: Select all
nas: ~ # lighttpd -V lighttpd/1.4.35 (ssl) - a light and fast webserver Build-Date: Feb 10 2015 00:13:46 Features: [...] - LDAP support [...]
So I started modifying the lighttpd port in /usr/local/nas4free/svn/build/ports/lighttpd. In the Makefile I did set --with-ldap and installed net/openldap24-client (which contains the libldap.so probably used) from ports. I also added libldap.so to LIB_DEPENDS. Anyway, it wouldn't build lighttpd with LDAP enabled, giving me on make following messages in the output:
In the port www/lighttpd you can use make config and enable the LDAP feature, but I couldn't find out what I am missing in my configuration since this is my first time messing with ports.[...]
===> lighttpd-1.4.35 depends on shared library: libldap.so - found (/usr/local/lib/libldap-2.4.so.2.10.3)
checking for LDAP support... yes
checking for ldap_bind in -lldap... no
Can anyone point me in the right direction what to do? And is it possible to include this feature in upcoming releases of NAS4Free?