Browse Source

0037: Setting Up LDAP Authenticated Directory in Apache HTTPD

i12bretro 4 years ago
parent
commit
8b1b8261df
1 changed files with 26 additions and 21 deletions
  1. 26 21
      0037.html

+ 26 - 21
0037.html

@@ -33,9 +33,13 @@
             $(document).on('click','input.copy-text',function(){
               theButton = $(this);
 														$('input.copy-text').attr('src','images/clipboard.png');
-							              $('span.copy-animation').removeClass('copy-animation');
+							              $('span.copy-animation,span.copy-animation-ps').removeClass('copy-animation copy-animation-ps');
               try {
-                $('#'+ theButton.attr('rel')).addClass('copy-animation');
+                if($('#'+ theButton.attr('rel')).parent('div').hasClass('PS')){
+                  $('#'+ theButton.attr('rel')).addClass('copy-animation-ps');
+                } else {
+                  $('#'+ theButton.attr('rel')).addClass('copy-animation');
+                }
                 navigator.clipboard.writeText(theButton.data('clipboard-text').replace(/<[^>]*>?/gm, ''));
 																theButton.attr('src','images/clipboard_active.png');
 								              } catch(err) {
@@ -57,8 +61,8 @@
             });
 
             if(window.self !== window.top){
-              window.parent.$('iframe.stepsFrame').height((this['scrollingElement']['scrollHeight']+20) +'px');
-            }
+															window.parent.$('iframe.stepsFrame').height((this['scrollingElement']['scrollHeight']+20) +'px');
+							            }
           });
         </script>
         <link href="css/steps.css" rel="stylesheet" type="text/css" />
@@ -104,29 +108,30 @@
 	<li>Find the authnz_ldap_module and make sure it is enabled by removing the # at the start of the line
 	<p>LoadModule authnz_ldap_module modules/mod_authnz_ldap.so</p>
 	</li>
-	<li>Find the&nbsp;ldap_module and make sure it is enabled by removing the # at the start of the line
+	<li>Find the ldap_module and make sure it is enabled by removing the # at the start of the line
 	<p>LoadModule ldap_module modules/mod_ldap.so</p>
 	</li>
 	<li>Create a Location block to enable LDAP authentication for the specified directory
-	<p><location ldaptest=""><br />
-	&nbsp; &nbsp; # Basic authentication with LDAP against MS AD<br />
-	&nbsp; &nbsp; AuthType Basic<br />
-	&nbsp; &nbsp; AuthBasicProvider ldap<br />
+	<p>&lt;location /ldaptest&gt;<br />
+	    # Basic authentication with LDAP against MS AD<br />
+	    AuthType Basic<br />
+	    AuthBasicProvider ldap<br />
 	<br />
-	&nbsp; &nbsp; # AuthLDAPURL specifies the LDAP server IP, port, base DN, scope and filter<br />
-	&nbsp; &nbsp; # using this format: ldap://host:port/basedn?attribute?scope?filter<br />
-	&nbsp; &nbsp; AuthLDAPURL &quot;ldap://i12bretro.local:389/DC=i12bretro,DC=local?sAMAccountName?sub?(objectClass=user)&quot; NONE<br />
+	    # AuthLDAPURL specifies the LDAP server IP, port, base DN, scope and filter<br />
+	    # using this format: ldap://host:port/basedn?attribute?scope?filter<br />
+	    AuthLDAPURL &quot;ldap://i12bretro.local:389/DC=i12bretro,DC=local?sAMAccountName?sub?(objectClass=user)&quot; NONE<br />
 	<br />
-	&nbsp; &nbsp; # The LDAP bind username and password<br />
-	&nbsp; &nbsp; AuthLDAPBindDN &quot;readonly_svc@i12bretro.local&quot;<br />
-	&nbsp; &nbsp; AuthLDAPBindPassword &quot;Read0nly!!&quot;<br />
-	&nbsp; &nbsp; LDAPReferrals Off<br />
-	&nbsp; &nbsp; AuthUserFile /dev/null<br />
+	    # The LDAP bind username and password<br />
+	    AuthLDAPBindDN &quot;readonly_svc@i12bretro.local&quot;<br />
+	    AuthLDAPBindPassword &quot;Read0nly!!&quot;<br />
+	    LDAPReferrals Off<br />
+	    AuthUserFile /dev/null<br />
 	<br />
-	&nbsp; &nbsp; AuthName &quot;Restricted Area [i12bretro.local]&quot;<br />
-	&nbsp; &nbsp; # to authenticate a domain group, specify the full DN<br />
-	&nbsp; &nbsp; AuthLDAPGroupAttributeIsDN on<br />
-	&nbsp; &nbsp; require ldap-group CN=WebAuthAccess,CN=Users,DC=i12bretro,DC=local</location></p>
+	    AuthName &quot;Restricted Area [i12bretro.local]&quot;<br />
+	    # to authenticate a domain group, specify the full DN<br />
+	    AuthLDAPGroupAttributeIsDN on<br />
+	    require ldap-group CN=WebAuthAccess,CN=Users,DC=i12bretro,DC=local<br />
+	&lt;/location&gt;</p>
 	</li>
 	<li>Save httpd.conf</li>
 	<li>Restart the Apache service</li>