在apache 中配置ldap 及 如何禁止目录浏览

来源:互联网 发布:打印机端口是什么意思 编辑:程序博客网 时间:2024/05/15 23:44

在apache 中配置ldap 及 如何禁止目录浏览

编辑httpd.conf文件,增加以下信息,或取消注释:

LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so

增加:

LDAPSharedCacheSize 200000
LDAPCacheEntries 1024
LDAPCacheTTL 600
LDAPOpCacheEntries 1024
LDAPOpCacheTTL 600

在apache 中如何禁止目录浏览,在节点中增加:

Options FollowSymlinks MultiViews

强制使用https浏览,增加:SSLRequireSSL

  Options FollowSymlinks MultiViews
  SSLRequireSSL
  AuthType Basic
  AuthName "Subversion repository"
  AuthBasicProvider ldap file
  AuthzLDAPAuthoritative off

#AuthLDAPURL ldap://ldap.localhost.com:389 服务器地址及端口

#dc=localhost,dc=com 域名
  AuthLDAPURL "ldap://ldap.localhost.com:389/dc=localhost,dc=com?sAMAccountName?sub?(objectClass=*)"
#AuthLDAPBindDN  ldap 查询用户 

  AuthLDAPBindDN svn@localhost.com
# AuthLDAPBindPassword ldap查询密码 

  AuthLDAPBindPassword xxxx

  AuthUserFile /etc/httpd/conf.d/svn_auth_file
  Require valid-user