{"id":18136,"date":"2013-12-28T06:01:05","date_gmt":"2013-12-27T22:01:05","guid":{"rendered":"https:\/\/2blog.ilc.edu.tw\/25793\/2013\/12\/28\/apache-%e4%bc%ba%e6%9c%8d%e5%99%a8%e4%bd%bf%e7%94%a8-ldap-%e8%aa%8d%e8%ad%89\/"},"modified":"2021-03-18T17:23:47","modified_gmt":"2021-03-18T09:23:47","slug":"apache-%e4%bc%ba%e6%9c%8d%e5%99%a8%e4%bd%bf%e7%94%a8-ldap-%e8%aa%8d%e8%ad%89","status":"publish","type":"post","link":"https:\/\/2blog.ilc.edu.tw\/25793\/2013\/12\/28\/apache-%e4%bc%ba%e6%9c%8d%e5%99%a8%e4%bd%bf%e7%94%a8-ldap-%e8%aa%8d%e8%ad%89\/","title":{"rendered":"Apache \u4f3a\u670d\u5668\u4f7f\u7528 LDAP \u8a8d\u8b49"},"content":{"rendered":"<p>Apache\u00a0\u7db2\u9801\u9664\u4e86\u53ef\u4ee5\u4f7f\u7528 .htaccess\u00a0\u548c MySQL\u00a0\u7684\u8a8d\u8b49\u5916\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528 LDAP Server\u00a0\u4f86\u505a\u4f7f\u7528\u8005\u7684\u8a8d\u8b49\u3002<\/p>\n<p>1.\u00a0\u5b89\u88dd\u6240\u9700\u7684\u5957\u4ef6<br \/># <span style=\"color: #ff0000\">yum install mod_authz_ldap php-ldap<\/span><\/p>\n<p>2.\u00a0\u5efa\u7acb\u6e2c\u8a66\u76ee\u9304\u53ca\u6a94\u6848<br \/># <span style=\"color: #ff0000\">mkid \/var\/www\/html\/testldap<\/span><br \/># <span style=\"color: #ff0000\">echo &#8220;Test LDAP&#8221; &gt; \/var\/www\/html\/testldap\/index.html<\/span><br \/>[@more@]3.\u00a0\u4fee\u6539\u8a2d\u5b9a\u6a94<br \/># <span style=\"color: #ff0000\">vim \/etc\/httpd\/conf.d\/authz_ldap.conf<\/span><br \/><span style=\"color: #0000ff\">LoadModule authz_ldap_module modules\/mod_authz_ldap.so<\/span><\/p>\n<p><span style=\"color: #0000ff\">&lt;IfModule mod_authz_ldap.c&gt;<\/span><\/p>\n<p><span style=\"color: #0000ff\">&lt;Directory &#8220;\/var\/www\/html\/testldap&#8221;&gt;<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0 AuthzLDAPMethod ldap<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0 # 192.168.154.167\u00a0\u70ba LDAP Server IP<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0 AuthzLDAPServer 192.168.154.167<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0 AuthzLDAPUserBase ou=Teacher,dc=ldap,dc=tces.ilc.edu.tw<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0 AuthzLDAPUserKey uid<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0 AuthzLDAPUserScope base<\/span><br \/><span style=\"color: #0000ff\">#<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0 AuthType Basic<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0 AuthName &#8220;Test LDAP&#8221;<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0 require valid-user<\/span><br \/><span style=\"color: #0000ff\">#<\/span><br \/><span style=\"color: #0000ff\">&lt;\/Directory&gt;<\/span><\/p>\n<p>4.\u00a0\u91cd\u65b0\u555f\u52d5 Apache Web Server<br \/># <span style=\"color: #ff0000\">service httpd restart<\/span><\/p>\n<p>5.\u00a0\u9032\u884c\u6e2c\u8a66<br \/><a id=\"res_2337610\" href=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/25793-2337610.png\"><img decoding=\"async\" src=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/previews-med\/25793-2337610.png\" border=\"0\" alt=\"\" \/><\/a><br \/>\u8f38\u5165\u6b63\u78ba\u7684\u5e33\u865f\u53ca\u5bc6\u78bc\uff0c\u5c31\u53ef\u4ee5\u770b\u5230\u6e2c\u8a66\u7684\u7db2\u9801<br \/><a id=\"res_2337609\" href=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/25793-2337609.png\"><img decoding=\"async\" src=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/previews-med\/25793-2337609.png\" border=\"0\" alt=\"\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apache\u00a0\u7db2\u9801\u9664\u4e86\u53ef\u4ee5\u4f7f\u7528 .htaccess\u00a0\u548c MySQL\u00a0\u7684\u8a8d\u8b49\u5916\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528 LDAP Serve &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/2blog.ilc.edu.tw\/25793\/2013\/12\/28\/apache-%e4%bc%ba%e6%9c%8d%e5%99%a8%e4%bd%bf%e7%94%a8-ldap-%e8%aa%8d%e8%ad%89\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008Apache \u4f3a\u670d\u5668\u4f7f\u7528 LDAP \u8a8d\u8b49\u3009<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[115,137],"tags":[],"class_list":["post-18136","post","type-post","status-publish","format-standard","hentry","category-c-78460","category-c-78482"],"meta_key":{"_encloseme":["1"],"lt_post_id":["468054"],"_pingme":["1"]},"_links":{"self":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18136"}],"collection":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/comments?post=18136"}],"version-history":[{"count":1,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18136\/revisions"}],"predecessor-version":[{"id":19816,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18136\/revisions\/19816"}],"wp:attachment":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/media?parent=18136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/categories?post=18136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/tags?post=18136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}