Apache + Webdav + LDAP + Debian

Getting those to work is not that difficult, but a LOT of site keep nagging about using:


You will get something like:

Invalid command ‘LDAP_Server’

Prerequisites are:

– Apache 2 under Debian
– Installed and working (open)LDAP

Something like; apt-get install apache2

Symbolic link the dav_load in mods-available/ to mods-enabled/. Do the same with auth_ldap.load and dav_fs.conf and dav_fs.load.

Then add the following to apache2.conf:

Listen 666
<VirtualHost *:666>
DAVLockDB /var/lib/dav/lockdb

Alias /share /home/share

<Location “/share”>
Options Indexes FollowSymLinks
AllowOverride None
order allow,deny
allow from all

AuthType Basic

AuthLDAPBindDN cn=admin,dc=mydomain,dc=com
AuthLDAPURL ldap://,dc=mydomain,dc=com?uid?sub?(objectClass=*)

AuthName “Repository Access”
Require valid-user


will be shared now under;


You can use SSL by putting:

SSLEngine On

in the <Location> directive.

I had a problem that I also use Samba and SCP for access on the same system, meaning that there could be a potential sharing access problem; everything must be written with group user and then made 770 directory/file mask.
To fix this, put in /etc/init.d/apache2

umask 0007

somewhere at the start and restart Apache. It will work..

Be the first to leave a comment. Don’t be shy.

Join the Discussion

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>