Skip to content

Instantly share code, notes, and snippets.

@TakashiSasaki
Created May 9, 2013 14:31
Show Gist options
  • Save TakashiSasaki/5547806 to your computer and use it in GitHub Desktop.
Save TakashiSasaki/5547806 to your computer and use it in GitHub Desktop.
HTTPベーシック認証の情報源をLDAPにしようとしてmod_auth_ldap.soを導入。肝はAuthLDAPUrlにベース、スコープ、キーの指定まで全部入れちゃえってこと。BASIC認証なのでページ自体もhttpsで。
LoadModule authz_ldap_module modules/mod_authz_ldap.so
LDAPVerifyServerCert Off
<IfModule mod_authz_ldap.c>
<Location />
AuthzLDAPMethod ldap
AuthLDAPUrl ldaps://192.168.0.1/dc=ore,dc=no,dc=erudappu?uid
AuthzLDAPUserScope subtree
AuthzLDAPAllowPassword on
AuthType Basic
AuthBasicProvider ldap
AuthName "restricted area"
require valid-user
AuthzLDAPLogLevel debug
</Location>
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment