*New 12.1 series Release:
2019-11-08: XigmaNAS 12.1.0.4.7091 - released!

*New 11.3 series Release:
2019-10-19: XigmaNAS 11.3.0.4.7014 - released


We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

lighttpd + mod_auth with LDAP backend

Webserver service.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
BGMogli
NewUser
NewUser
Posts: 2
Joined: 23 Mar 2015 14:05
Status: Offline

lighttpd + mod_auth with LDAP backend

#1

Post by BGMogli » 24 Mar 2015 13:18

Hello,

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:

Code: Select all

nas lighttpd[7149]: (http_auth.c.887) password doesn't match for / username: admin, IP: 172.17.xx.xxx
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: 9.3.0.2 - Nayla (revision 1349)).

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 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.
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:
[...]
===> 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
[...]
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.

Can anyone point me in the right direction what to do? And is it possible to include this feature in upcoming releases of NAS4Free?

Post Reply

Return to “WebServer”