{"id":333073,"date":"2021-02-08T12:27:28","date_gmt":"2021-02-08T04:27:28","guid":{"rendered":"http:\/\/4563.org\/?p=333073"},"modified":"2021-02-08T12:27:28","modified_gmt":"2021-02-08T04:27:28","slug":"%e6%b1%82%e5%8a%a9%e4%b8%80%e4%b8%aa-lighttpd-auth-%e8%ae%a4%e8%af%81%e7%9a%84%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=333073","title":{"rendered":"\u6c42\u52a9\u4e00\u4e2a lighttpd auth \u8ba4\u8bc1\u7684\u95ee\u9898"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u6c42\u52a9\u4e00\u4e2a lighttpd auth \u8ba4\u8bc1\u7684\u95ee\u9898               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : AllenHua <\/span>  <span><i><\/i> 2<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u7528 openwrt + lighttpd + webdav \u642d\u5efa\u4e86\u4e00\u4e2a webdav \u670d\u52a1\uff0cserver \u7528\u7684 <code>lighttpd<\/code>, \u8ba4\u8bc1\u7528\u7684 <code>lighttpd-mod-auth<\/code> \u548c <code>lighttpd-mod-authn_file<\/code><\/p>\n<p>\u4e0b\u9762\u662f\u914d\u7f6e\u6587\u4ef6 <code>\/etc\/lighttpd\/conf.d\/20-auth.conf<\/code><\/p>\n<pre><code>####################################################################### ## ##  Authentication Module ## ----------------------- ## ## See https:\/\/redmine.lighttpd.net\/projects\/lighttpd\/wiki\/docs_modauth ## for more info. ## server.modules += ( \"mod_auth\" )  auth.backend                 = \"plain\" auth.backend.plain.userfile  = \"\/etc\/lighttpd\/lighttpd.user\" #auth.backend.plain.groupfile = \"\/etc\/lighttpd\/lighttpd.group\"  #auth.backend.ldap.hostname = \"localhost\" #auth.backend.ldap.base-dn  = \"dc=my-domain,dc=com\" #auth.backend.ldap.filter   = \"(uid=$)\"  auth.require               = ( \"\/\" =&gt;                                (                                  \"method\"  =&gt; \"basic\",                                  \"realm\"   =&gt; \"Allen Hua's WebDAV File Server\",                                  \"require\" =&gt; \"valid-user\"                                ),                              )  auth.cache = (\"max-age\" =&gt; \"180\")  ## ####################################################################### <\/code><\/pre>\n<p>\u76ee\u524d\u8fbe\u6210\u65e2\u5b9a\u76ee\u6807\uff0c\u53ef\u4ee5\u6b63\u5e38\u8ba4\u8bc1<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" referrerpolicy=\"no-referrer\" rel=\"noreferrer\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2021\/02\/20210209_60221b82bf983.png\" alt=\"\u6c42\u52a9\u4e00\u4e2a lighttpd auth \u8ba4\u8bc1\u7684\u95ee\u9898\" \/><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" referrerpolicy=\"no-referrer\" rel=\"noreferrer\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2021\/02\/20210209_60221b839daa6.png\" alt=\"\u6c42\u52a9\u4e00\u4e2a lighttpd auth \u8ba4\u8bc1\u7684\u95ee\u9898\" \/><\/p>\n<p>\u5e0c\u671b\u4f18\u5316\u7684\u70b9\uff1a<\/p>\n<p><strong>\u4f18\u5316\u6210\u6bcf\u6b21\u90fd\u9700\u8981\u8ba4\u8bc1\uff0c\u6216\u8005\u8bbe\u7f6e\u4e00\u4e2a\u7f13\u5b58\u65f6\u95f4 5 \u5206\u949f\u5185\u624d\u4e0d\u9700\u8981\u8ba4\u8bc1\uff08\u56e0\u4e3a\u901a\u8fc7 frp \u5185\u7f51\u7a7f\u900f\u4e86 \u901a\u8fc7\u5916\u7f51\u8bbf\u95ee \u5e0c\u671b\u5b89\u5168\u4e00\u4e9b\u6bcf\u6b21\u90fd\u80fd\u8ba4\u8bc1\u4e00\u4e0b\uff09<\/strong><\/p>\n<p>\u770b\u4e86\u4e0b \u5b98\u65b9\u6587\u6863 https:\/\/redmine.lighttpd.net\/projects\/lighttpd\/wiki\/docs_modauth \u4e2d\u7684 <code>auth.cache<\/code> \u76f8\u5173\u7684\u914d\u7f6e\uff0c\u76ee\u524d\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u7ed9\u5b9a\u4e86\u914d\u7f6e\u4f46\u6ca1\u6709\u751f\u6548\uff0c\u5e0c\u671b\u6709\u61c2\u7684 v \u53cb\u7ed9\u70b9\u601d\u8def\u6216\u610f\u89c1\uff01<\/p>\n<p>\u611f\u8c22\u9605\u8bfb\u3002<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>0<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u6c42\u52a9\u4e00\u4e2a lighttpd aut&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/333073"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=333073"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/333073\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=333073"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=333073"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=333073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}