{"id":232613,"date":"2023-12-25T20:32:21","date_gmt":"2023-12-25T12:32:21","guid":{"rendered":"https:\/\/www.idc.net\/help\/232613\/"},"modified":"2023-12-25T20:32:21","modified_gmt":"2023-12-25T12:32:21","slug":"apache%e5%ae%89%e5%85%a8%e7%ad%96%e7%95%a5%ef%bc%9a%e4%bd%bf%e7%94%a8mod_authn_core%e8%bf%9b%e8%a1%8c%e6%a0%b8%e5%bf%83%e8%ba%ab%e4%bb%bd%e9%aa%8c%e8%af%81","status":"publish","type":"post","link":"https:\/\/idc.net\/help\/232613\/","title":{"rendered":"Apache\u5b89\u5168\u7b56\u7565\uff1a\u4f7f\u7528mod_authn_core\u8fdb\u884c\u6838\u5fc3\u8eab\u4efd\u9a8c\u8bc1"},"content":{"rendered":"<p><title id=\"apache%e5%ae%89%e5%85%a8%e7%ad%96%e7%95%a5%ef%bc%9a%e4%bd%bf%e7%94%a8mod_authn_core%e8%bf%9b%e8%a1%8c%e6%a0%b8%e5%bf%83%e8%ba%ab%e4%bb%bd%e9%aa%8c%e8%af%81-wyfLVJRejx\">Apache\u5b89\u5168\u7b56\u7565\uff1a\u4f7f\u7528mod_authn_core\u8fdb\u884c\u6838\u5fc3\u8eab\u4efd\u9a8c\u8bc1<\/title><\/p>\n<h1 id=\"apache%e5%ae%89%e5%85%a8%e7%ad%96%e7%95%a5%ef%bc%9a%e4%bd%bf%e7%94%a8mod_authn_core%e8%bf%9b%e8%a1%8c%e6%a0%b8%e5%bf%83%e8%ba%ab%e4%bb%bd%e9%aa%8c%e8%af%81-wyfLVJRejx\">Apache\u5b89\u5168\u7b56\u7565\uff1a\u4f7f\u7528mod_authn_core\u8fdb\u884c\u6838\u5fc3\u8eab\u4efd\u9a8c\u8bc1<\/h1>\n<p>Apache\u662f\u4e00\u79cd\u6d41\u884c\u7684\u5f00\u6e90Web\u670d\u52a1\u5668\u8f6f\u4ef6\uff0c\u5e7f\u6cdb\u7528\u4e8e\u4e92\u8054\u7f51\u4e0a\u7684\u7f51\u7ad9\u548c\u5e94\u7528\u7a0b\u5e8f\u3002\u4e3a\u4e86\u4fdd\u62a4\u7f51\u7ad9\u7684\u5b89\u5168\u6027\uff0cApache\u63d0\u4f9b\u4e86\u591a\u79cd\u8eab\u4efd\u9a8c\u8bc1\u6a21\u5757\uff0c\u5176\u4e2d\u4e4b\u4e00\u662fmod_authn_core\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528mod_authn_core\u6a21\u5757\u6765\u5b9e\u73b0\u6838\u5fc3\u8eab\u4efd\u9a8c\u8bc1\u3002<\/p>\n<h2 id=\"%e4%bb%80%e4%b9%88%e6%98%afmod_authn_core%ef%bc%9f-wyfLVJRejx\">\u4ec0\u4e48\u662fmod_authn_core\uff1f<\/h2>\n<p>mod_authn_core\u662fApache\u7684\u4e00\u4e2a\u6838\u5fc3\u6a21\u5757\uff0c\u7528\u4e8e\u5904\u7406\u7528\u6237\u8eab\u4efd\u9a8c\u8bc1\u3002\u5b83\u63d0\u4f9b\u4e86\u4e00\u79cd\u7075\u6d3b\u7684\u65b9\u5f0f\u6765\u9a8c\u8bc1\u7528\u6237\u7684\u8eab\u4efd\uff0c\u5e76\u6839\u636e\u9a8c\u8bc1\u7ed3\u679c\u6765\u63a7\u5236\u5bf9\u8d44\u6e90\u7684\u8bbf\u95ee\u6743\u9650\u3002<\/p>\n<h2 id=\"%e5%a6%82%e4%bd%95%e5%90%af%e7%94%a8mod_authn_core%e6%a8%a1%e5%9d%97%ef%bc%9f-wyfLVJRejx\">\u5982\u4f55\u542f\u7528mod_authn_core\u6a21\u5757\uff1f<\/h2>\n<p>\u8981\u542f\u7528mod_authn_core\u6a21\u5757\uff0c\u60a8\u9700\u8981\u7f16\u8f91Apache\u7684\u914d\u7f6e\u6587\u4ef6\u3002\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u627e\u5230\u4ee5\u4e0b\u884c\uff1a<\/p>\n<pre><code>&lt;IfModule !mod_authn_core.c&gt;\n    LoadModule authn_core_module modules\/mod_authn_core.so\n&lt;\/IfModule&gt;\n<\/code><\/pre>\n<p>\u786e\u4fdd\u8fd9\u4e9b\u884c\u6ca1\u6709\u88ab\u6ce8\u91ca\u6389\uff08\u6ca1\u6709\u4ee5\u201c#\u201d\u5f00\u5934\uff09\uff0c\u5982\u679c\u88ab\u6ce8\u91ca\u6389\uff0c\u8bf7\u5220\u9664\u6ce8\u91ca\u7b26\u53f7\u3002\u4fdd\u5b58\u914d\u7f6e\u6587\u4ef6\u5e76\u91cd\u65b0\u542f\u52a8Apache\u670d\u52a1\u5668\u3002<\/p>\n<h2 id=\"%e5%a6%82%e4%bd%95%e9%85%8d%e7%bd%ae%e6%a0%b8%e5%bf%83%e8%ba%ab%e4%bb%bd%e9%aa%8c%e8%af%81%ef%bc%9f-wyfLVJRejx\">\u5982\u4f55\u914d\u7f6e\u6838\u5fc3\u8eab\u4efd\u9a8c\u8bc1\uff1f<\/h2>\n<p>\u4e00\u65e6mod_authn_core\u6a21\u5757\u542f\u7528\uff0c\u60a8\u53ef\u4ee5\u5728Apache\u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e\u6838\u5fc3\u8eab\u4efd\u9a8c\u8bc1\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u914d\u7f6e\uff1a<\/p>\n<pre><code>&lt;Location \/private&gt;\n    AuthType Basic\n    AuthName \"Private Area\"\n    AuthBasicProvider file\n    AuthUserFile \/path\/to\/passwords\n    Require valid-user\n&lt;\/Location&gt;\n<\/code><\/pre>\n<p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2a\u540d\u4e3a\u201cPrivate Area\u201d\u7684\u53d7\u4fdd\u62a4\u533a\u57df\u3002\u7528\u6237\u9700\u8981\u63d0\u4f9b\u6709\u6548\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\u624d\u80fd\u8bbf\u95ee\u8be5\u533a\u57df\u3002\u7528\u6237\u540d\u548c\u5bc6\u7801\u5b58\u50a8\u5728\u4e00\u4e2a\u6587\u4ef6\u4e2d\uff08\/path\/to\/passwords\uff09\uff0c\u60a8\u9700\u8981\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u8fdb\u884c\u66ff\u6362\u3002<\/p>\n<h2 id=\"%e5%85%b6%e4%bb%96%e6%a0%b8%e5%bf%83%e8%ba%ab%e4%bb%bd%e9%aa%8c%e8%af%81%e9%80%89%e9%a1%b9-wyfLVJRejx\">\u5176\u4ed6\u6838\u5fc3\u8eab\u4efd\u9a8c\u8bc1\u9009\u9879<\/h2>\n<p>\u9664\u4e86\u57fa\u672c\u8eab\u4efd\u9a8c\u8bc1\u5916\uff0cmod_authn_core\u8fd8\u652f\u6301\u5176\u4ed6\u8eab\u4efd\u9a8c\u8bc1\u65b9\u6cd5\uff0c\u5982Digest\u8eab\u4efd\u9a8c\u8bc1\u548cLDAP\u8eab\u4efd\u9a8c\u8bc1\u3002\u60a8\u53ef\u4ee5\u6839\u636e\u9700\u8981\u9009\u62e9\u9002\u5408\u60a8\u7684\u8eab\u4efd\u9a8c\u8bc1\u65b9\u6cd5\u3002<\/p>\n<h2 id=\"%e6%80%bb%e7%bb%93-wyfLVJRejx\">\u603b\u7ed3<\/h2>\n<p>\u901a\u8fc7\u4f7f\u7528Apache\u7684mod_authn_core\u6a21\u5757\uff0c\u60a8\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u6838\u5fc3\u8eab\u4efd\u9a8c\u8bc1\uff0c\u4ee5\u4fdd\u62a4\u60a8\u7684\u7f51\u7ad9\u548c\u5e94\u7528\u7a0b\u5e8f\u514d\u53d7\u672a\u7ecf\u6388\u6743\u7684\u8bbf\u95ee\u3002\u4e86\u89e3\u5982\u4f55\u542f\u7528\u548c\u914d\u7f6emod_authn_core\u6a21\u5757\u662f\u4fdd\u62a4\u60a8\u7684\u670d\u52a1\u5668\u548c\u7528\u6237\u6570\u636e\u5b89\u5168\u7684\u91cd\u8981\u4e00\u6b65\u3002<\/p>\n<p>\u9999\u6e2f\u670d\u52a1\u5668\u9996\u9009\u540e\u6d6a\u4e91\uff0c\u63d0\u4f9b\u53ef\u9760\u7684\u670d\u52a1\u5668\u6258\u7ba1\u670d\u52a1\u3002\u60a8\u53ef\u4ee5\u8bbf\u95ee\u6211\u4eec\u7684\u5b98\u7f51\u4e86\u89e3\u66f4\u591a\u4fe1\u606f\uff1a<a href=\"https:\/\/idc.net\">https:\/\/idc.net<\/a>\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apache\u5b89\u5168\u7b56\u7565\uff1a\u4f7f\u7528mod_authn_core\u8fdb\u884c\u6838\u5fc3\u8eab\u4efd\u9a8c\u8bc1 Apache\u5b89\u5168\u7b56\u7565\uff1a\u4f7f\u7528mod_au [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[],"class_list":["post-232613","post","type-post","status-publish","format-standard","hentry","category-apache"],"_links":{"self":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/232613","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/comments?post=232613"}],"version-history":[{"count":0,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/232613\/revisions"}],"wp:attachment":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media?parent=232613"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/categories?post=232613"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/tags?post=232613"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}