Skip to content

Instantly share code, notes, and snippets.

@onecooltaco
Last active August 29, 2015 14:23
Show Gist options
  • Save onecooltaco/b0055763bd847f064bef to your computer and use it in GitHub Desktop.
Save onecooltaco/b0055763bd847f064bef to your computer and use it in GitHub Desktop.
Apache authentication
AuthName "Protected Access"
AuthType Basic
AuthBasicProvider ldap
AuthzLDAPAuthoritative off
AuthLDAPURL ldap://server.fqdn/cn=users,dc=<domain>,dc=com?uid
require valid-user
## The user should be a member of a certain group:
# AuthLDAPGroupAttribute memberUid
# AuthLDAPGroupAttributeIsDN off
# require ldap-group cn=<group>,cn=groups,dc=<domain>,dc=com
AuthName "description"
AuthType Basic
AuthUserFile /path/to/.htpasswd
<Limit GET>
require user foo
</Limit>
PerlModule Authen::Simple::Apache
PerlModule Authen::Simple::ActiveDirectory
PerlSetVar AuthenSimpleActiveDirectory_host "server.ad.domain.com"
PerlSetVar AuthenSimpleActiveDirectory_principal "ad.domain.com"
PerlAuthenHandler Authen::Simple::ActiveDirectory
AuthType Basic
AuthName "Protected Access"
Require valid-user
PerlModule Authen::Simple::Apache
PerlModule Authen::Simple::LDAP
PerlSetVar AuthenSimpleLDAP_host "server.fqdn:389"
PerlSetVar AuthenSimpleLDAP_basedn "cn=users,dc=<domain>,dc=com"
PerlSetVar AuthenSimpleLDAP_filter '(&(objectClass=inetOrgPerson)(objectClass=posixAccount)(uid=%s))'
PerlSetVar AuthenSimpleLDAP_timeout '30'
PerlAuthenHandler Authen::Simple::LDAP
AuthType Basic
AuthName "Protected Access"
Require valid-user
PerlModule Authen::Simple::Apache
PerlModule Authen::Simple::PAM
PerlSetVar AuthenSimplePAM_service "login"
PerlAuthenHandler Authen::Simple::PAM
AuthType Basic
AuthName "Potected Access"
Require valid-user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment