1,105,633 Community Members

LDAP problems with Apache 2.2

Member Avatar
mi.mac.rules
Light Poster
33 posts since Oct 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

I'm trying to startup my Ubuntu Apache install and there's a problem loading LDAP modules that I can't seem to resolve:

httpd: Syntax error on line 65 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2.2/modules/mod_authnz_ldap.so into server: /usr/local/apache2.2/modules/mod_authnz_ldap.so: undefined symbol: apr_ldap_url_parse

Any help would be appreciated, thanks.

Member Avatar
nonshatter
Posting Whiz
377 posts since Nov 2009
Reputation Points: 26 [?]
Q&As Helped to Solve: 60 [?]
Skill Endorsements: 0 [?]
 
0
 

There is a syntax error in your configuration file. You should be using /usr/local/apache2/sites-available/default to configure the directives in apache.

But it looks like you have edited httpd.conf. Perhaps you are using a deprecated directive? Can you post lines 60-70 of httpd.conf so I can have a look.

Have you enabled the LDAP modules? This is the one you need:

sudo a2enmod authnz_ldap

Once you enable the module, the module will be available in the the /apache2/mods-enabled/ directory.

Member Avatar
nonshatter
Posting Whiz
377 posts since Nov 2009
Reputation Points: 26 [?]
Q&As Helped to Solve: 60 [?]
Skill Endorsements: 0 [?]
 
0
 

Actually, this may be because you're missing the APR Apache/LDAP driver.

sudo apt-get install libapr1 libaprutil1 libaprutil1-ldap

Try these then restart apache.

Member Avatar
mi.mac.rules
Light Poster
33 posts since Oct 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

I have an editted http.conf, so which lines would you like to see? I'm loading over 40 modules so the line numbers are somewhat skewed.

And I had already tried to install those libraries - when I tried again, it just said

Reading package lists... Done
Building dependency tree
Reading state information... Done
libapr1 is already the newest version.
libapr1 set to manually installed.
libaprutil1 is already the newest version.
libaprutil1 set to manually installed.
libaprutil1-ldap is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.

//EDIT

I took a look at the httpd directory and found an ldap folder - it said to run the configure script

./configure --with-ldap --enable-ldap --enable-authnz-ldap

But that yielded this:

checking for ldap support...
checking for ldap_init in -lldap50... no
checking for ldap_init in -lldapssl41... no
checking for ldap_init in -lldapssl40... no
checking for ldap_init in -lldapssl30... no
checking for ldap_init in -lldapssl20... no
checking for ldap_init in -lldapsdk... no
checking for ldap_init in -lldapsdk... no
checking for ldap_init in -lldap... no
checking for ldap_init in -lldap... no
checking for ldap_init in -lldap... no
checking for ldap_init in -lldap... no
configure: error: could not find an LDAP library
configure failed for srclib/apr-util

Member Avatar
nonshatter
Posting Whiz
377 posts since Nov 2009
Reputation Points: 26 [?]
Q&As Helped to Solve: 60 [?]
Skill Endorsements: 0 [?]
 
1
 

I have never seen that problem before. You said you were using ubuntu?

From a bare-metal install, all I ever had to do to enable LDAP was:

# sudo apt-get install apache2
# a2enmod authnz_ldap
# /etc/init.d/apache2 restart

Did you install Apache via apt-get or did you build everything manually?

From my experience, I've never had to configure httpd.conf to enable the modules for me as a2enmod does it for you. You could try removing your edits from this file then re-enabling the mods.

Inside the folder /etc/apache2/mods-enabled/ we will find all the enabled modules. Here we will find symlinks to the files from mods_available for all the enabled modules. Only the modules found in this folder will be enabled at run time.

Member Avatar
mi.mac.rules
Light Poster
33 posts since Oct 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

I built and installed it manually. I'll try removing the edits and re-enabling the mods. Is there a standard list of the modules that come enabled (as I just copied over the httpd.conf file from the old install - probably not the safest idea)?

Member Avatar
nonshatter
Posting Whiz
377 posts since Nov 2009
Reputation Points: 26 [?]
Q&As Helped to Solve: 60 [?]
Skill Endorsements: 0 [?]
 
0
 

Yup, that wasn't the best idea. Get an original back in place asap. (You shouldn't need to edit it at all to get ldap working).

apache2 -l

Will display the pre-compiled modules.

I have core.c, mod_log_config.x, mod_logio.c, prefork.c, http_core.c, mod_so.c

Member Avatar
mi.mac.rules
Light Poster
33 posts since Oct 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

Alright thanks, I found another apache installation on the server that I didn't know about and I think that's what's been wrong. I'm going to try and get that working as I need it. Thanks for your help.

Question Answered as of 2 Years Ago by nonshatter
Member Avatar
madihaghafoor
Newbie Poster
2 posts since May 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

If you are running Red Hat Linux 4.0 like I am, during the installation process you are allowed to select whether or not you want to install a web server. If you do, Red Hat 4.0 includes the latest Apache and installs everything automatically with a default configuration.

You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: