HP Open Source Middleware Stacks Blueprint: LAMP Architecture on HP ProLiant BladeSystem Servers on RHEL
1. Edit the following file:
/etc/httpd/conf/httpd.conf
Verify that the preceding file contains the following modules:
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
2. Create the following file:
/var/www/html/foo/index.html
Add the following lines to the preceding file:
<HTML>
<HEAD>
<title>Test Apache & CDS integration</title>
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
</HEAD>
<BODY>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm">
<FONT FACE="Times New Roman, serif" SIZE=6>
Directory foo succeed! </FONT>
</P>
</BODY>
</HTML>
3. Edit the following file:
/etc/httpd/conf/httpd.conf
Add the following lines to the preceding file:
<Directory "/var/www/html/foo">
Options Indexes FollowSymLinks
AllowOverride None
order allow,deny
allow from all
AuthType Basic
AuthName Internal
AuthBasicProvider ldap
AuthzLDAPAuthoritative off
AuthLDAPURL ldap://<YOUR_LDAP_SERVER_IP>/dc=osm,dc=example,dc=com?uid??(objectclass=*)
Require ldap-group cn=tomcat,ou=groups,dc=osm,dc=example,dc=com
AuthLDAPBindDN cn=Manager,dc=example,dc=com
AuthLDAPBindPassword secret
</Directory>
4. Restart Apache by entering the following command:
# /etc/init.d/httpd restart
5. Verify that the Apache LDAP authentication is operating properly by navigating to the
following website at:
http://<YOUR_WEB_SERVER_IP>/foo/
6. When prompted, log in with the user name tomy and the password tom.
The login fails, the following message appears:
Authorization Required
The tomy user does not belong to the tomcat group so the authentication failed. This failure
proves that the Apache Web server authentication services are operating properly. This can
be further proved to be true by entering the user name benw and password ben and the
following message displays:
The Authentication and Authorization worked !
Secure the Web Server Stack 25