Not a question, but I just had to do this and know other people might want
to do the same thing.

Brian
--------------
Edir (through LDAP) authentication to a web server directory on OES/Linux

/etc/apache2/default-server.conf
--------------------------------------------------------------------------
In the <Directory "/srv/www/htdocs"> section, change the AllowOverride line to:
AllowOverride Limit AuthConfig
--------------------------------------------------------------------------
Then restart apache2.

Place a .htaccess file in the directory to require authentication for. Here is a .htaccess file example that searches from the root of the tree for the user. If the user is coming from the 192.168/16 network, no username or password is asked for in this example.

..htaccess
--------------------------------------------------------------------------
Satisfy any
<Limit GET>
Order deny,allow
Deny from all
Allow from 192.168.
</Limit>
AuthName "Restricted Access"
AuthType Basic
AuthLDAPURL ldap://127.0.0.1/?cn?sub?(objectClass=user)
require valid-user
--------------------------------------------------------------------------

You can specify a particular context and for it not to search subcontainers with a line like this:

AuthLDAPURL
ldap://127.0.0.1/ou=accounting,o=company?cn?one?(objectClass=user)