{"id":54787,"date":"2024-10-09T21:52:47","date_gmt":"2024-10-09T13:52:47","guid":{"rendered":"https:\/\/server.hk\/cnblog\/54787\/"},"modified":"2024-10-09T21:52:47","modified_gmt":"2024-10-09T13:52:47","slug":"%e5%af%a6%e7%8f%be%e5%9c%a8-windows-%e4%b8%8b%e5%ae%89%e8%a3%9d-lighttpd-%e7%9a%84%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/54787\/","title":{"rendered":"\u5be6\u73fe\u5728 Windows \u4e0b\u5b89\u88dd Lighttpd \u7684\u65b9\u6cd5"},"content":{"rendered":"<h1 id=\"%e5%af%a6%e7%8f%be%e5%9c%a8-windows-%e4%b8%8b%e5%ae%89%e8%a3%9d-lighttpd-%e7%9a%84%e6%96%b9%e6%b3%95-bSIlewPMfn\">\u5be6\u73fe\u5728 Windows \u4e0b\u5b89\u88dd Lighttpd \u7684\u65b9\u6cd5<\/h1>\n<p>Lighttpd \u662f\u4e00\u6b3e\u8f15\u91cf\u7d1a\u7684\u7db2\u9801\u4f3a\u670d\u5668\uff0c\u56e0\u5176\u9ad8\u6548\u80fd\u548c\u4f4e\u8cc7\u6e90\u6d88\u8017\u800c\u53d7\u5230\u5ee3\u6cdb\u4f7f\u7528\u3002\u96d6\u7136\u5b83\u4e3b\u8981\u5728 Linux \u74b0\u5883\u4e2d\u904b\u884c\uff0c\u4f46\u5728 Windows \u7cfb\u7d71\u4e0a\u5b89\u88dd Lighttpd \u4e5f\u662f\u53ef\u884c\u7684\u3002\u672c\u6587\u5c07\u8a73\u7d30\u4ecb\u7d39\u5728 Windows \u4e0b\u5b89\u88dd Lighttpd \u7684\u6b65\u9a5f\uff0c\u5e6b\u52a9\u7528\u6236\u5feb\u901f\u4e0a\u624b\u3002<\/p>\n<h2 id=\"%e5%ae%89%e8%a3%9d%e5%89%8d%e7%9a%84%e6%ba%96%e5%82%99-bSIlewPMfn\">\u5b89\u88dd\u524d\u7684\u6e96\u5099<\/h2>\n<p>\u5728\u958b\u59cb\u5b89\u88dd\u4e4b\u524d\uff0c\u8acb\u78ba\u4fdd\u60a8\u7684 Windows \u7cfb\u7d71\u5df2\u7d93\u5b89\u88dd\u4e86\u4ee5\u4e0b\u7d44\u4ef6\uff1a<\/p>\n<ul>\n<li>Windows 7 \u6216\u66f4\u9ad8\u7248\u672c\u7684\u64cd\u4f5c\u7cfb\u7d71<\/li>\n<li>\u5b89\u88dd\u4e86 Visual C++ Redistributable<\/li>\n<li>\u5177\u5099\u7ba1\u7406\u54e1\u6b0a\u9650\u7684\u5e33\u6236<\/li>\n<\/ul>\n<h2 id=\"%e4%b8%8b%e8%bc%89-lighttpd-bSIlewPMfn\">\u4e0b\u8f09 Lighttpd<\/h2>\n<p>\u9996\u5148\uff0c\u60a8\u9700\u8981\u5f9e Lighttpd \u7684\u5b98\u65b9\u7db2\u7ad9\u4e0b\u8f09 Windows \u7248\u672c\u7684\u5b89\u88dd\u5305\u3002\u53ef\u4ee5\u8a2a\u554f\u4ee5\u4e0b\u93c8\u63a5\uff1a<\/p>\n<ul>\n<li><a href=\"https:\/\/www.lighttpd.net\/download\/\" rel=\"nofollow noopener\" target=\"_blank\">Lighttpd \u4e0b\u8f09\u9801\u9762<\/a><\/li>\n<\/ul>\n<p>\u5728\u4e0b\u8f09\u9801\u9762\u4e2d\uff0c\u9078\u64c7\u9069\u5408\u60a8\u7cfb\u7d71\u7684\u7248\u672c\uff0c\u901a\u5e38\u662f .zip \u683c\u5f0f\u7684\u58d3\u7e2e\u5305\u3002<\/p>\n<h2 id=\"%e8%a7%a3%e5%a3%93%e7%b8%ae%e5%ae%89%e8%a3%9d%e5%8c%85-bSIlewPMfn\">\u89e3\u58d3\u7e2e\u5b89\u88dd\u5305<\/h2>\n<p>\u4e0b\u8f09\u5b8c\u6210\u5f8c\uff0c\u5c07\u58d3\u7e2e\u5305\u89e3\u58d3\u7e2e\u5230\u60a8\u5e0c\u671b\u5b89\u88dd Lighttpd \u7684\u76ee\u9304\u4e2d\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u4ee5\u5c07\u5176\u89e3\u58d3\u7e2e\u5230 C:lighttpd\u3002<\/p>\n<h2 id=\"%e9%85%8d%e7%bd%ae-lighttpd-bSIlewPMfn\">\u914d\u7f6e Lighttpd<\/h2>\n<p>\u5728\u89e3\u58d3\u7e2e\u7684\u76ee\u9304\u4e2d\uff0c\u60a8\u6703\u770b\u5230\u4e00\u500b\u540d\u70ba <code>lighttpd.conf<\/code> \u7684\u914d\u7f6e\u6587\u4ef6\u3002\u4f7f\u7528\u6587\u672c\u7de8\u8f2f\u5668\uff08\u5982 Notepad++\uff09\u6253\u958b\u8a72\u6587\u4ef6\uff0c\u4e26\u6839\u64da\u60a8\u7684\u9700\u6c42\u9032\u884c\u914d\u7f6e\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u57fa\u672c\u7684\u914d\u7f6e\u793a\u4f8b\uff1a<\/p>\n<pre><code>server.modules = (\n    \"mod_access\",\n    \"mod_alias\",\n    \"mod_auth\",\n    \"mod_compress\",\n    \"mod_redirect\",\n)\n\nserver.document-root = \"C:\/lighttpd\/htdocs\"\nserver.port = 80\n<\/code><\/pre>\n<p>\u5728\u9019\u88e1\uff0c\u60a8\u53ef\u4ee5\u6839\u64da\u9700\u8981\u4fee\u6539 <code>server.document-root<\/code> \u7684\u8def\u5f91\uff0c\u4ee5\u6307\u5411\u60a8\u7684\u7db2\u7ad9\u6839\u76ee\u9304\u3002<\/p>\n<h2 id=\"%e5%95%9f%e5%8b%95-lighttpd-bSIlewPMfn\">\u555f\u52d5 Lighttpd<\/h2>\n<p>\u8981\u555f\u52d5 Lighttpd\uff0c\u60a8\u9700\u8981\u4f7f\u7528\u547d\u4ee4\u63d0\u793a\u7b26\u3002\u8acb\u6309\u7167\u4ee5\u4e0b\u6b65\u9a5f\u64cd\u4f5c\uff1a<\/p>\n<ol>\n<li>\u6309\u4e0b <code>Win + R<\/code> \u9375\uff0c\u8f38\u5165 <code>cmd<\/code>\uff0c\u7136\u5f8c\u6309\u4e0b Enter \u9375\u3002<\/li>\n<li>\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\uff0c\u5c0e\u822a\u5230 Lighttpd \u7684\u5b89\u88dd\u76ee\u9304\u3002\u4f8b\u5982\uff1a<code>cd C:lighttpd<\/code><\/li>\n<li>\u8f38\u5165\u4ee5\u4e0b\u547d\u4ee4\u555f\u52d5 Lighttpd\uff1a<code>lighttpd -f lighttpd.conf<\/code><\/li>\n<\/ol>\n<p>\u5982\u679c\u4e00\u5207\u6b63\u5e38\uff0c\u60a8\u61c9\u8a72\u6703\u770b\u5230\u4e00\u689d\u6d88\u606f\uff0c\u986f\u793a Lighttpd \u5df2\u6210\u529f\u555f\u52d5\u3002<\/p>\n<h2 id=\"%e6%b8%ac%e8%a9%a6-lighttpd-bSIlewPMfn\">\u6e2c\u8a66 Lighttpd<\/h2>\n<p>\u5728\u700f\u89bd\u5668\u4e2d\u8f38\u5165 <code>http:\/\/localhost<\/code>\uff0c\u5982\u679c\u60a8\u770b\u5230 Lighttpd \u7684\u6b61\u8fce\u9801\u9762\uff0c\u5247\u8868\u793a\u5b89\u88dd\u6210\u529f\u3002<\/p>\n<h2 id=\"%e6%95%85%e9%9a%9c%e6%8e%92%e9%99%a4-bSIlewPMfn\">\u6545\u969c\u6392\u9664<\/h2>\n<p>\u5982\u679c\u5728\u555f\u52d5\u904e\u7a0b\u4e2d\u9047\u5230\u554f\u984c\uff0c\u8acb\u6aa2\u67e5\u4ee5\u4e0b\u5e7e\u9ede\uff1a<\/p>\n<ul>\n<li>\u78ba\u4fdd\u6c92\u6709\u5176\u4ed6\u61c9\u7528\u7a0b\u5e8f\u4f54\u7528 80 \u7aef\u53e3\u3002<\/li>\n<li>\u6aa2\u67e5\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u8def\u5f91\u662f\u5426\u6b63\u78ba\u3002<\/li>\n<li>\u67e5\u770b\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u7684\u932f\u8aa4\u6d88\u606f\uff0c\u4ee5\u7372\u53d6\u66f4\u591a\u4fe1\u606f\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-bSIlewPMfn\">\u7e3d\u7d50<\/h2>\n<p>\u5728 Windows \u4e0b\u5b89\u88dd Lighttpd \u662f\u4e00\u500b\u76f8\u5c0d\u7c21\u55ae\u7684\u904e\u7a0b\uff0c\u53ea\u9700\u4e0b\u8f09\u3001\u89e3\u58d3\u7e2e\u3001\u914d\u7f6e\u548c\u555f\u52d5\u5373\u53ef\u3002\u9019\u6b3e\u8f15\u91cf\u7d1a\u7684\u7db2\u9801\u4f3a\u670d\u5668\u975e\u5e38\u9069\u5408\u9700\u8981\u9ad8\u6548\u80fd\u548c\u4f4e\u8cc7\u6e90\u6d88\u8017\u7684\u61c9\u7528\u5834\u666f\u3002\u5982\u679c\u60a8\u9700\u8981\u66f4\u9ad8\u6548\u7684\u4f3a\u670d\u5668\u89e3\u6c7a\u65b9\u6848\uff0c\u53ef\u4ee5\u8003\u616e\u4f7f\u7528 <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u670d\u52d9\uff0c\u9019\u5c07\u70ba\u60a8\u7684\u7db2\u7ad9\u63d0\u4f9b\u7a69\u5b9a\u7684\u652f\u6301\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e86\u89e3\u5982\u4f55\u5728 Windows \u7cfb\u7d71\u4e0a\u5b89\u88dd Lighttpd\uff0c\u7c21\u55ae\u6b65\u9a5f\u52a9\u4f60\u5feb\u901f\u642d\u5efa\u8f15\u91cf\u7d1a\u7db2\u9801\u4f3a\u670d\u5668\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4924],"tags":[],"class_list":["post-54787","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/54787","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=54787"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/54787\/revisions"}],"predecessor-version":[{"id":54788,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/54787\/revisions\/54788"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=54787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=54787"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=54787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}