HP (Hewlett-Packard) 5991-5565 Network Card User Manual


 
1. Edit the following file:
/etc/apache2/default-server.conf
Add the ldap and authnz_ldap modules to the APACHE_MODULES line. Once this edit is
complete, the line should look like the following:
APACHE_MODULES= "... ... ldap authnz_ldap"
2. Create the following file:
/srv/www/htdocs/ldaptest/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>
The Authentication and Authorization worked! </FONT>
</P>
</BODY>
</HTML>
3. Edit the following file:
/etc/apache2/default-server.conf
Add the following lines to the preceding file:
<Directory "/var/www/html/ldaptest">
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 valid-user
AuthLDAPBindDN cn=Manager,dc=example,dc=com
AuthLDAPBindPassword secret
</Directory>
4. Restart Apache by entering the following command:
# /etc/init.d/apache2 restart
5. Verify that the Apache LDAP authentication is operating properly by navigating to the
website located at:
http://<YOUR_WEB_SERVER_IP>/ldaptest/
6. When prompted, log in with the user name tomy and the password tom.
If the login succeeds, the following message appears: .
The Authentication and Authorization worked !
If the login fails, the following message appears:
Authorization Required
Protecting Tomcat Authorization with Symas CDS
Symas CDS can be used by Tomcat web applications to authenticate users and grant authorization.
This section describes how to protect a web application in Tomcat.
46