{"id":963,"date":"2018-10-18T00:44:25","date_gmt":"2018-10-17T16:44:25","guid":{"rendered":"http:\/\/43.142.23.169\/?p=963"},"modified":"2018-10-18T00:44:25","modified_gmt":"2018-10-17T16:44:25","slug":"caddy-install","status":"publish","type":"post","link":"https:\/\/blog.240996.xyz\/index.php\/2018\/10\/18\/caddy-install\/","title":{"rendered":"Caddy\u4e00\u952e\u5b89\u88c5\u811a\u672c\u2014\u2014\u8de8\u5e73\u53f0\u652f\u6301\u7684\u6781\u7b80 HTTP Server (\u81ea\u52a8\u7533\u8bf7HTTPS\u8bc1\u4e66)"},"content":{"rendered":"<h2>\u524d\u8a00<\/h2>\n<p>Caddy\u662f\u4e00\u4e2aHTTP server\uff0c\u53ef\u4ee5\u975e\u5e38\u7b80\u5355\u7684\u5b89\u88c5\uff08Go\u8bed\u8a00\u7f16\u5199\uff0c\u4e8c\u8fdb\u5236\u5355\u6587\u4ef6\uff09\uff0c\u914d\u7f6e\u6587\u4ef6\u4e5f\u5f88\u7b80\u5355\uff0c\u540c\u65f6\u8fd8\u6709\u4e00\u4e9b\u6709\u8da3\u7684\u6269\u5c55\uff0c\u53ef\u4ee5\u975e\u5e38\u65b9\u4fbf\u7684\u642d\u5efa\u4e00\u4e2aHTTP\u670d\u52a1<\/p>\n<h2>\u811a\u672c\u7cfb\u7edf\u8981\u6c42<\/h2>\n<p>CentOS 6+ \/ Debian 6+ \/ Ubuntu 14.04 +<br \/>\u63a8\u8350 Debian 7 x64<\/p>\n<h2>\u5b89\u88c5\u6b65\u9aa4<\/h2>\n<p>\u6267\u884c\u4e0b\u9762\u7684\u4ee3\u7801\u5b89\u88c5 Caddy<\/p>\n<pre><code>wget -N --no-check-certificate https:\/\/softs.loan\/Bash\/caddy_install.sh && chmod +x caddy_install.sh && bash caddy_install.sh\n<\/code><\/pre>\n<p>\u5982\u679c\u4e0a\u9762\u8fd9\u4e2a\u811a\u672c\u65e0\u6cd5\u4e0b\u8f7d\uff0c\u5c1d\u8bd5\u4f7f\u7528\u5907\u7528\u4e0b\u8f7d\uff1a<\/p>\n<pre><code>wget -N --no-check-certificate https:\/\/raw.githubusercontent.com\/ToyoDAdoubi\/doubi\/master\/caddy_install.sh && chmod +x caddy_install.sh && bash caddy_install.sh\n<\/code><\/pre>\n<p>\u5982\u679c\u60f3\u8981\u5b89\u88c5\u5176\u4ed6\u6269\u5c55\u53ef\u4ee5\u628a\u540d\u5b57\u52a0\u5230\u547d\u4ee4\u540e\u9762\uff0c\u4f8b\u5982\u5b89\u88c5\u6269\u5c55\uff1a<code>http.filemanager\u3001http.git\u3001http.filter<\/code><\/p>\n<p>\u90a3\u4e48\u5c31\u662f\uff1a <code>bash caddy_install.sh install http.filemanager,http.git,http.filter<\/code> \uff08\u6269\u5c55\u4e4b\u95f4\u82f1\u6587\u534a\u89d2\u9017\u53f7\u5206\u5272\uff09<br \/>\u4f8b\u5982\u8981\u5b89\u88c5filemanager\u6269\u5c55\uff08\u5728\u7ebf\u6587\u4ef6\u7ba1\u7406\u5668\/\u79c1\u4eba\u7f51\u76d8\uff09\uff0c\u5219\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre><code>wget -N --no-check-certificate https:\/\/softs.loan\/Bash\/caddy_install.sh && chmod +x caddy_install.sh && bash caddy_install.sh install http.filemanager\n<\/code><\/pre>\n<p>\u6269\u5c55\u5217\u8868<a href=\"https:\/\/caddyserver.com\/download\" target=\"_blank\">https:\/\/caddyserver.com\/download<\/a><\/p>\n<h2>\u4f7f\u7528\u8bf4\u660e<\/h2>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\u5728<code>\/usr\/local\/caddy\/<\/code>\u76ee\u5f55\u4e0b\u65b0\u5efa\u6587\u4ef6\u540d\u4e3a<code>Caddyfile<\/code>\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u5e76\u5199\u5165\u914d\u7f6e<\/p>\n<p>\u542f\u52a8\uff1a<code>\/etc\/init.d\/caddy start<\/code><\/p>\n<p>\u505c\u6b62\uff1a<code>\/etc\/init.d\/caddy stop<\/code><\/p>\n<p>\u91cd\u542f\uff1a<code>\/etc\/init.d\/caddy restart<\/code><\/p>\n<p>\u67e5\u770b\u72b6\u6001\uff1a<code>\/etc\/init.d\/caddy status<\/code><\/p>\n<p>\u67e5\u770bCaddy\u542f\u52a8\u65e5\u5fd7\uff1a <code>tail -f \/tmp\/caddy.log<\/code><\/p>\n<p>\u5b89\u88c5\u76ee\u5f55\uff1a<code>\/usr\/local\/caddy<\/code><\/p>\n<p>Caddy\u914d\u7f6e\u6587\u4ef6\u4f4d\u7f6e\uff1a<code>\/usr\/local\/caddy\/Caddyfile<\/code><\/p>\n<p>Caddy\u81ea\u52a8\u7533\u8bf7SSL\u8bc1\u4e66\u4f4d\u7f6e\uff1a<code>\/.caddy\/acme\/acme-v01.api.letsencrypt.org\/sites\/xxx.xxx(\u57df\u540d)\/<\/code><\/p>\n<h2>\u5347\u7ea7Caddy\u6216\u8005\u66f4\u65b0\u6269\u5c55<\/h2>\n<p>\u53ea\u9700\u8981\u91cd\u65b0\u6267\u884c\u4f60\u5f53\u521d\u5b89\u88c5\u65f6\u5019\u7528\u7684\u547d\u4ee4\u5373\u53ef\uff0c\u4f1a\u8986\u76d6\u5b89\u88c5\u6700\u65b0\u7684Caddy+\u6269\u5c55\uff08\u5982\u6709\uff09<\/p>\n<h2>\u5378\u8f7dCaddy<\/h2>\n<p>\u5378\u8f7d\u4e0d\u4f1a\u5220\u9664\u865a\u62df\u4e3b\u673a\u7684\u5185\u5bb9\uff0c\u53ea\u4f1a\u5220\u9664Caddy\u81ea\u8eab\u548c\u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n<pre><code>wget -N --no-check-certificate https:\/\/softs.loan\/Bash\/caddy_install.sh && bash caddy_install.sh uninstall\n<\/code><\/pre>\n<p>\u5982\u679c\u4e0a\u9762\u8fd9\u4e2a\u811a\u672c\u65e0\u6cd5\u4e0b\u8f7d\uff0c\u5c1d\u8bd5\u4f7f\u7528\u5907\u7528\u4e0b\u8f7d\uff1a<\/p>\n<pre><code>wget -N --no-check-certificate https:\/\/raw.githubusercontent.com\/ToyoDAdoubi\/doubi\/master\/caddy_install.sh && bash caddy_install.sh uninstall\n<\/code><\/pre>\n<p>\u539f\u6587\u5730\u5740\uff1a<a href=\"https:\/\/doub.io\/shell-jc1\/\" target=\"_blank\">https:\/\/doub.io\/shell-jc1\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00 Caddy\u662f\u4e00\u4e2aHTTP server\uff0c\u53ef\u4ee5\u975e\u5e38\u7b80\u5355\u7684\u5b89\u88c5\uff08Go\u8bed\u8a00\u7f16\u5199\uff0c\u4e8c\u8fdb\u5236\u5355\u6587\u4ef6\uff09\uff0c\u914d\u7f6e\u6587\u4ef6\u4e5f\u5f88\u7b80 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":965,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-963","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-exp"],"_links":{"self":[{"href":"https:\/\/blog.240996.xyz\/index.php\/wp-json\/wp\/v2\/posts\/963","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.240996.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.240996.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.240996.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.240996.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=963"}],"version-history":[{"count":0,"href":"https:\/\/blog.240996.xyz\/index.php\/wp-json\/wp\/v2\/posts\/963\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.240996.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=963"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.240996.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=963"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.240996.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=963"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}