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)

1
  • Did you try to change the order of the lines AuthType and AuthBasicProvider?
    – gertvdijk
    Sep 20, 2012 at 7:39

1 Answer 1

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

1
  • yes this worked in my case. thanks Feb 21, 2020 at 12:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .