Basic Auth + LDAP2014/08/25 |
Limit accesses on specific web pages and use LDAP users for authentication with SSL connection.
|
|
[1] | |
[2] | |
[3] | For example, set Basic Auth under the [/var/www/html/auth-ldap] directory. |
[root@www ~]#
yum -y install mod_authz_ldap
[root@www ~]#
vi /etc/httpd/conf.d/authz_ldap.conf # add follows to the end <Directory /var/www/html/auth-ldap> SSLRequireSSL AuthName "LDAP Authentication" AuthType Basic AuthzLDAPMethod ldap AuthzLDAPServer dlp.srv.world AuthzLDAPUserBase ou=people,dc=srv,dc=world AuthzLDAPUserKey uid AuthzLDAPUserScope base require valid-user </Directory> # create a test page [root@www ~]# mkdir /var/www/html/auth-ldap [root@www ~]# vi /var/www/html/auth-ldap/index.html <html> <body> <div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;"> Test Page for LDAP Auth </div> </body> </html> /etc/rc.d/init.d/httpd restart Stopping httpd: [ OK ] Starting httpd: [ OK ] |
[4] | Access to the test page with a Web browser on Client and authenticate with a user which is on LDAP. |
[5] | Just accessed. |
Sponsored Link |