How to configure Active Directory authentication with Apache web server
การ authen ผ่าน Active directory หรือ LDAP เป็นทางเลือกที่สะดวกสบายและง่ายต่อการบริหารจัดการกับผู้ใช้งานภายในองค์กรณ์ ใน Apache เองก็มีความสามารถที่จะ Authen ผ่าน AD ได้เช่นกัน โดยแก้ไขไฟล์ config ต่างๆ เพียงเล็กน้อยอำนาจการจัดการผู้ใช้งานผ่าน AD ก็จะมาอยู่ในมือแล้ว
การแก้ไขค่าเพื่อให้ Apache สามารถ authen ผ่าน Active directory มีขั้นตอนง่ายๆ เพียงแค่สามขั้นตอนเท่านั้น คือ
- แก้ไขไฟล์ /etc/http/conf/httpd.conf โดยให้ uncomment บรรทัดตามข้างล่างนี้ออก
123LoadModule authnz_ldap_module modules/mod_authnz_ldap.so - เพิ่มข้อมูลบรรทัดด้านล่างนี้ลงไป โดยแก้ไขตรง Directory ให้เป็น path ที่เราวางไฟล์ไว้ และแก้ไขตรงส่วนของ LDAP Authen
123456789101112131415161718############## LDAP Authen #########################AuthBasicProvider ldapAuthType BasicAuthzLDAPAuthoritative onAuthName "Enter your LDAP username and Password"Require ldap-group CN=EzGroup,OU=GROUPS,DC=ezylinux,DC=comAuthLDAPURL "ldap://ldap.ezylinux.com/OU=Staff,DC=ezylinux,DC=com?SAMAccountName"AuthLDAPBindDN "CN=ldapsearch,OU=Corporate,DC=ezylinux,DC=com"AuthLDAPBindPassword "your-password"################################################Options Indexes FollowSymLinksAllowOverride NoneOptions Indexes FollowSymLinksAllowOverride AllOrder allow,denyAllow from all - restart apache ใหม่ด้วยคำสั่ง
123[root@Ezylinux ~]# service httpd graceful
คำค้นยอดนิยม: active directory