openldap + phpldapadmin problem

Hi, I am trying to install an openldap with the phpldapadmin interface.
At the moment y installed open ldap following the “LDAP Authentication“ tutorial (http://www.freebsd.org/doc/en_US.ISO8859-1/articles/ldap-auth/ldap.html). I configured the ldap.conf, I do not want to use TSL.

Once openldap is installed and running I started with the phpldapadmin installation:

Code:
cd /usr/ports/net/phpldapadmin
make install clean

After the installation I added the line
Code:
apache2_enable="YES"
to the /etc/rc.conf to enable the apache. Then I configured the apache:

Code:
vi /usr/local/etc/apache2/httpd.conf

I added the line
Code:
DocumentRoot "/usr/local/www/phpldapadmin"

Then I restarted the apache:

Code:
/usr/local/etc/rc.d/apache2 restart
Performing sanity check on apache2 configuration:
Syntax OK
Stopping apache2.
Waiting for PIDS: 776.
Performing sanity check on apache2 configuration:
Syntax OK

When I enter the IP address of my server on the firefox I saw the following:

(see attached file)

I checked the httpd.conf file and the php module is loaded:
Code:
LoadModule php5_module        libexec/apache2/libphp5.so

I do not understand why I am seeing the phpldapadmin page like an ftp.
Can you please help me?
Thanks in advance!
 

Attachments

  • Sin título.jpg
    Sin título.jpg
    58.6 KB · Views: 524
Hi, thanks for the reply. I checked the apache configuration an found that the apache server was not loading php, so I configured the apache server and now I am able to see the phpldapadmin page.

Now I am having an other problem, when I access the phpldapadmin page and enter my username and password to login the server. There is no problem with the login, but when I try to see the ldaptree or add a new user I see the following messasge:

Code:
This base entry does not exist.Create it?

I checked the config.php file of the phpldapadmin, I think that there should be the problem:

Code:
vi /usr/local/www/apache22/data/phpldapadmin/config/config.php

/*********************************************/
/* Define your LDAP servers in this section  */
/*********************************************/

$servers = new Datastore();

/* $servers->NewServer('ldap_pla') must be called before each new LDAP server
   declaration. */
$servers->newServer('ldap_pla');

/* A convenient name that will appear in the tree viewer and throughout
   phpLDAPadmin to identify this LDAP server to users. */
#$servers->setValue('server','name','server');

$servers->SetValue('server','base',array('dc=server,dc=example,dc=com'));

/* Examples:
   'ldap.example.com',
   'ldaps://ldap.example.com/',
   'ldapi://%2fusr%local%2fvar%2frun%2fldapi'
           (Unix socket at /usr/local/var/run/ldap) */
// $servers->setValue('server','host','127.0.0.1');

/* The port your LDAP server listens on (no quotes). 389 is standard. */
// $servers->setValue('server','port',389);

/* Array of base DNs of your LDAP server. Leave this blank to have phpLDAPadmin
   auto-detect it for you. */
// $servers->setValue('server','base',array(''));

/* Four options for auth_type:
   1. 'cookie': you will login via a web form, and a client-side cookie will
      store your login dn and password.
   2. 'session': same as cookie but your login dn and password are stored on the
      web server in a persistent session variable.
   3. 'http': same as session but your login dn and password are retrieved via
      HTTP authentication.
   4. 'config': specify your login dn and password here in this config file. No
      login will be required to use phpLDAPadmin for this server.

   Choose wisely to protect your authentication information appropriately for
   your situation. If you choose 'cookie', your cookie contents will be
   encrypted using blowfish and the secret your specify above as
   session['blowfish']. */
// $servers->setValue('login','auth_type','session');

/* The DN of the user for phpLDAPadmin to bind with. For anonymous binds or
   'cookie' or 'session' auth_types, LEAVE THE LOGIN_DN AND LOGIN_PASS BLANK. If
   you specify a login_attr in conjunction with a cookie or session auth_type,
   then you can also specify the bind_id/bind_pass here for searching the
   directory for users (ie, if your LDAP server does not allow anonymous binds. */
// $servers->setValue('login','bind_id','');
#  $servers->setValue('login','bind_id','cn=Manager,dc=example,dc=com');

/* Your LDAP password. If you specified an empty bind_id above, this MUST also
   be blank. */
// $servers->setValue('login','bind_pass','');
#  $servers->setValue('login','bind_pass','secret');

/* Use TLS (Transport Layer Security) to connect to the LDAP server. */
// $servers->setValue('server','tls',false);
 
Back
Top