Travel

Categories

Sample .htaccess for mod_authnz_ldap/mod_auth_ldap for apache

AuthName "Pls login with your  username and  password"
AuthType Basic
AuthBasicProvider ldap
AuthLDAPURL  "ldap://ldap.abc.edu.hk:389/dc=abc,dc=edu,dc=hk?uid"
AuthzLDAPAuthoritative  off
Allow from mynetwork/24
Deny from all
Satisfy Any
Require  valid-user

This .htaccess will ask the user to enter the usernanme and password when connecting from outside mynetwork/24

Still working on how to do a posix group based authentication, however just based on the example given from the apache manual of using mod_authnz_ldap, I can’t make it work…

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>