EXAMPLE INSTALLATION

The proposed example use a protected site named test.example.com. Non authenticated users are redirected to auth.example.com.

PREREQ

Software

To use Lemonldap::NG, you have to run a LDAP server and of course an Apache server compiled with mod-perl (version 1.3 or 2.x). Generaly, the version of Apache proposed with your Linux distribution match, but some distributions used an experimental version of mod_perl with Apache2 (mod_perl-1.99) which does not work with Lemonldap::NG. With such distributions (like Debian-3.1), you have to use Apache-1.3 or to use a mod_perl, CGI.pm and CGI/Cookie.pm backports (www.backports.org package for Debian works fine).

Needed Perl modules

Apache::Session, Net::LDAP, MIME::Base64, CGI, LWP::UserAgent, Cache::Cache, DBI, XML::Simple, SOAP::Lite (only if you want to use SOAP with the manager).

With Debian, use:
apt-get install libapache-session-perl libnet-ldap-perl libcache-cache-perl libdbi-perl perl-modules libwww-perl libcache-cache-perl libxml-simple-perl
# If you want to use SOAP with the manager:
apt-get install libsoap-lite-perl

BUILDING

Complete install

$ tar xzf lemonldap-ng-*.tar.gz
$ cd lemonldap-ng-*
$ make && make test
$ sudo make install
$ make example

Debian install

$ tar xzf lemonldap-ng-*.tar.gz
$ cd lemonldap-ng-*
$ debuild
$ sudo dpkg -i ../lemonldap-ng*.deb

EXAMPLE CONFIGURATION

After build, you have a new file named example/apache.conf. You just have to include this file in Apache configuration:

# Apache-1.3: add this to httpd.conf
include /path/to/lemonldap-ng/source/example/apache.conf
# Apache-2.x:
include /path/to/lemonldap-ng/source/example/apache2.conf
# Debian Apache-1.3
ln -s /usr/share/doc/lemonldap-ng/example/apache.conf /etc/apache/conf.d/test.conf
# or with Apache-2.x
ln -s /usr/share/doc/lemonldap-ng/example/apache2.conf /etc/apache2/sites-enabled/test.conf

Modify your /etc/hosts file to include:

127.0.0.2       auth.example.com
127.0.0.3       test.example.com
127.0.0.4       manager.example.com

Now you have to edit configuration to set your LDAP settings. You can either use : If you don't set managerDn and managerPassword, Lemonldap::NG will use an anonymous bind to find user dn.

WARNINGS: Next, restart Apache and use your prefered browser and try to connect to http://test.example.com/. You'll be redirect to auth.example.com. Try to authenticate yourself with a valid account and the protected page will appear.