Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is there a way to configure mod_auth_ldap without modifying httpd.conf ? (ie. only using .htaccess files)

The reason I ask is that we are trying to setup a directory on our site to use ldap authentication (I do not administrate the ldap server, simply have credentials to connect.) Additionally, I do not administrate the box hosting this project and am wondering if I can set this up without having to modify the main httpd.conf as this box hosts many many sites.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

On the Apache 2.2 documentation each directive has a Context line that tells you where you can use it. Most of the directives required to set the ldap module can be used on .htaccess files, so I think you can use it without any major changes to the site-wide config.

share|improve this answer

Loading the module needs to be done in the httpd.conf or something included by it (not a .htaccess file), but everything else (enabling the module, setting up how it talks to the LDAP server, setting what users are allowed, etc) can be done in a virtualhost, <directory>, .htaccess, <location>, etc...

Note: mod_auth_ldap, mod_authz_ldap and mod_authnz_ldap are all different. My experience is primarily with mod_authnz_ldap and mod_authz_ldap; I haven't used mod_auth_ldap in a long time.

share|improve this answer
    
The modules are loaded in httpd.conf but I did see a few places mentioning configuring more in httpd.conf. Thanks. –  Chris Jul 29 '10 at 15:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.