# Sample Apache 2.4 configuration file for GestioIP with authentication
# against a MS Active directory
# You need to adapt the paths to the paths of your Linux distribution
# (this is for Debian)
# NOTE: This is pure Apache. There are many examples of
# Apache configurations which work with LDAP. So if it doesn't
# work after the first try search WWW or Apache mailing lists
# for solution. E.g. search for "Apache LDAP authentication"
AddHandler cgi-script .cgi
AddDefaultCharset utf8
AllowOverride None
DirectoryIndex index.cgi
Options +ExecCGI +FollowSymLinks
AuthType Basic
AuthBasicProvider ldap
AuthName "GestioIP - Authentication against AD"
# user to connect to the LDAP/MS-Active Directory (only read access required)
AuthLDAPBindDN "username"
AuthLDAPBindPassword "password"
AuthLDAPURL "ldap://dc.domain.org:389/ou=User,dc=domain,dc=org?sAMAccountName?sub?(objectClass=*)" NONE
Require ldap-group OU=MYGROUP,DC=domain,DC=org
ErrorDocument 401 /var/www/gestioip/errors/error401.html
ErrorDocument 403 /var/www/gestioip/errors/error403.html
ErrorDocument 404 /var/www/gestioip/errors/error404.html
ErrorDocument 500 /var/www/gestioip/errors/error500.html
AddHandler cgi-script .cgi
AddDefaultCharset utf8
AllowOverride None
Options +ExecCGI
ErrorDocument 401 /var/www/gestioip/errors/error401.html
ErrorDocument 403 /var/www/gestioip/errors/error403.html
ErrorDocument 404 /var/www/gestioip/errors/error404.html
ErrorDocument 500 /var/www/gestioip/errors/error500.html
AddDefaultCharset utf8
AllowOverride None
Require all denied
ErrorDocument 401 /var/www/gestioip/errors/error401.html
ErrorDocument 403 /var/www/gestioip/errors/error403.html
ErrorDocument 404 /var/www/gestioip/errors/error404.html
ErrorDocument 500 /var/www/gestioip/errors/error500.html
AddDefaultCharset utf8
AllowOverride None
Require all denied
ErrorDocument 401 /var/www/gestioip/errors/error401.html
ErrorDocument 403 /var/www/gestioip/errors/error403.html
ErrorDocument 404 /var/www/gestioip/errors/error404.html
ErrorDocument 500 /var/www/gestioip/errors/error500.html
AddDefaultCharset utf8
AllowOverride None
ErrorDocument 401 /var/www/gestioip/errors/error401.html
ErrorDocument 403 /var/www/gestioip/errors/error403.html
ErrorDocument 404 /var/www/gestioip/errors/error404.html
ErrorDocument 500 /var/www/gestioip/errors/error500.html