1

I am trying to install basic ldap authentication on a website on an apache 2.2 server. I put this in my /etc/apache2/apache2.conf file

LoadModule ldap_module /usr/lib/apache2/modules/mod_ldap.so
LoadModule authnz_ldap_module /usr/lib/apache2/modules/mod_authnz_ldap.so

I located those modules, so i am sure they exsist.

I put this in my /etc/apache2/sites-avaible/default

<VirtualHost *:80>
        ServerName monitoring.site.local
        DocumentRoot /var/www/Monitoring/public

        <Directory /var/www/Monitoring/public>
         AuthBasicProvider ldap
        AuthType Basic
        AuthzLDAPAuthoritative off
        AuthName "Monitoring"
        AuthLDAPURL "ldap://dc1.site.local:389/DC=site,DC=local?sAmaccountName?sub.(objClass=*)"NONE#
        AuthLDAPBindDN "CN=Admin,CN=Users,DC=site,DC=local"
        AuthLDAPBindPassword secret
        require valid-user
....

But when i try to restart my server i get this error

Syntax error on line 23 of /etc/apache2/sites-enabled/000-default: Invalid command 'AuthBasicProvider', perhaps misspelled or defined by a module not included in the server configuration Action 'configtest' failed. The Apache error log may have more information. ...fail!

I tried to enable some modules with a2enmod with no succes. My apache server: Server version: Apache/2.2.17 (Ubuntu)

DenBelg
  • 21
  • 1
  • 3

1 Answers1

2

According to Apache Documentation AuthBasicProvider directive is provided by mod_auth_basic. You should check if this module is enabled in your configuration by running apache2 -M

AlexD
  • 8,179
  • 2
  • 28
  • 38