In order to integrate the Apache web server with Active Directory authentication, you will need to reconfigure the settings associated with the virtual directory used by the Watson Explorer Engine. The Apache settings for this directory are stored in the file vivisimo-apache.conf in your Watson Explorer Engine installation directory.
When you first install the Watson Explorer Engine, the vivisimo-apache.conf file should look something like the following if you accept the default values during the installation process:
ScriptAlias "/vivisimo//cgi-bin/" "/opt/ibm/WEX/Engine/www/cgi-bin/"
Alias "/vivisimo//images/" "/opt/ibm/WEX/Engine/www/images/"
Alias "/vivisimo//js/" "/opt/ibm/WEX/Engine/www/js/"
Alias "/vivisimo//" "/opt/ibm/WEX/Engine/www/en/"
<Directory "/opt/ibm/WEX/Engine">
SetEnv LD_LIBRARY_PATH "/opt/ibm/WEX/Engine/lib/:"
</Directory>
To integrate Active Directory authentication with the directory where your Watson Explorer Engine software was installed (which was /opt/ibm/WEX/Engine in this example), you will need to change this file, substantially increasing the size of the Directory stanza for /opt/ibm/WEX/Engine so that it looks something like one of the following two examples.
If you are running Apache 2.1.x or earlier and your web server process is still named httpd, you will need to make modifications like the following to your vivisimo-apache.conf file:
ScriptAlias "/vivisimo//cgi-bin/" "/opt/ibm/WEX/Engine/www/cgi-bin/"
Alias "/vivisimo//images/" "/opt/ibm/WEX/Engine/www/images/"
Alias "/vivisimo//js/" "/opt/ibm/WEX/Engine/www/js/"
Alias "/vivisimo//" "/opt/ibm/WEX/Engine/www/en/"
LoadModule ldap_module /etc/httpd/modules/mod_ldap.so
LoadModule auth_ldap_module /etc/httpd/modules/mod_auth_ldap.so
<Directory "/opt/ibm/WEX/Engine">
<Files "crawler-test">
AddDefaultCharset Off
</Files>
Options All ExecCGI -Indexes
Order allow,deny
Allow from all
AuthType Basic
AuthName "Training Domain"
AuthLDAPAuthoritative On
AuthLDAPURL "ldap://192.168.0.66:389/CN=Users,DC=training,DC=local\
?sAMAccountName?sub?(objectClass=*)"
AuthLDAPBindDN CN=Administrator,CN=Users,DC=training,DC=local
AuthLDAPBindPassword password
Require valid-user
</Directory>
If you are running Apache 2.2.x or greater and your web server process is named apache2, you will need to make modifications like the following to your vivisimo-apache.conf file:
ScriptAlias "/vivisimo//cgi-bin/" "/opt/ibm/WEX/Engine/www/cgi-bin/"
Alias "/vivisimo//images/" "/opt/ibm/WEX/Engine/www/images/"
Alias "/vivisimo//js/" "/opt/ibm/WEX/Engine/www/js/"
Alias "/vivisimo//" "/opt/ibm/WEX/Engine/www/en/"
LoadModule ldap_module /usr/lib/apache2/modules/mod_ldap.so
LoadModule authnz_ldap_module /usr/lib/apache2/modules/mod_authnz_ldap.so
<Directory "/opt/ibm/WEX/Engine">
SetEnv LD_LIBRARY_PATH "/opt/ibm/WEX/Engine/lib/"
Options All ExecCGI -Indexes
Order allow,deny
Allow from all
AuthType Basic
AuthBasicProvider ldap
AuthName "Training Domain"
AuthzLDAPAuthoritative Off
AuthLDAPURL "ldap://192.168.0.66:389/CN=Users,DC=training,DC=local\
?sAMAccountName?sub?(objectClass=*)"
AuthLDAPBindDN CN=Administrator,CN=Users,DC=training,DC=local
AuthLDAPBindPassword password
Require valid-user
</Directory>
As you can see, these examples are very similar. The primary differences are the path and file names of the LDAP-related modules, whether the AuthBasicProvider directive is required (or valid), and the value for the AuthzLDAPAuthoritative directive. These are explained in the following list of LDAP-related changes to your web server's configuration file.
The new entries added to this file have the following meanings:
At this point, you should restart your apache server, usually by using whichever of the following utilities is appropriate for your system:
The graceful keyword restarts the Apache daemon without closing open connections.
After restarting Apache, attempting to execute the Watson Explorer Engine administration tool should display a username and password dialog, in which you can successfully authenticate.
To proceed with this tutorial and learn how to enable authentication in the Microsoft IIS web server, click Enabling Authentication in IIS. To learn how to enable authentication in your project, click Customizing Search Application Authentication Settings.