{"id":39339,"date":"2020-02-22T14:13:37","date_gmt":"2020-02-22T06:13:37","guid":{"rendered":"http:\/\/4563.org\/?p=39339"},"modified":"2020-02-22T14:13:37","modified_gmt":"2020-02-22T06:13:37","slug":"%e6%96%b0%e7%b3%bb%e7%bb%9f%e4%b8%ba%e5%95%a5%e5%ae%89%e8%a3%85caddy%e5%a4%b1%e8%b4%a5%e5%91%a2","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=39339","title":{"rendered":"\u65b0\u7cfb\u7edf\u4e3a\u5565\u5b89\u88c5caddy\u5931\u8d25\u5462"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>\u5e7d\u68a6\u5f71<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-8 20:13:38\t<\/p>\n<h3>\u65b0\u7cfb\u7edf\u4e3a\u5565\u5b89\u88c5caddy\u5931\u8d25\u5462<\/h3>\n<p>  \t\troot@SolidSpicy-VM:~# caddy -service install -agree -email 1794655017@qq.com -conf \/usr\/local\/bin\/CaddyfileFailed to install caddy: Init already exists: \/etc\/systemd\/system\/caddy.service<br \/>  root@SolidSpicy-VM:~# rm \/etc\/systemd\/system\/caddy.service<br \/>  root@SolidSpicy-VM:~# caddy -service install -agree -email 1794655017@qq.com -conf \/usr\/local\/bin\/CaddyfileFailed to install caddy: exit status 1<br \/>  root@SolidSpicy-VM:~# curl https:\/\/getcaddy.com | bash -s personal hook.service<br \/>  % Total&nbsp; &nbsp; % Received % XferdAverage Speed&nbsp; &nbsp;Time&nbsp; &nbsp; Time&nbsp; &nbsp;TimeCurrent<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;DloadUpload&nbsp; &nbsp;Total&nbsp; &nbsp;Spent&nbsp; &nbsp; LeftSpeed<br \/>  10073801007380&nbsp; &nbsp; 0&nbsp; &nbsp;020995&nbsp; &nbsp;&nbsp; &nbsp;0 &#8211;:&#8211;:&#8211; &#8211;:&#8211;:&#8211; &#8211;:&#8211;:&#8211; 21025<br \/>  Downloading Caddy for linux\/amd64 (personal license)&#8230;<br \/>  No valid response from keyservers<br \/>  Extracting&#8230;<br \/>  Backing up \/usr\/local\/bin\/caddy to \/usr\/local\/bin\/caddy_old<br \/>  (Password may be required.)<br \/>  Putting caddy in \/usr\/local\/bin (may require password)<br \/>  Caddy v1.0.4 (h1:wwuGSkUHo6RZ3oMpeTt7J09WBB87X5o+IZN4dKehcQE=)<br \/>  Successfully installed<br \/>  root@SolidSpicy-VM:~# caddy -service install -agree -email 1794655017@qq.com -conf \/usr\/local\/bin\/CaddyfileFailed to install caddy: Init already exists: \/etc\/systemd\/system\/caddy.service<br \/>  \u6c42\u6307\u6559\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u674e\u767d<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-8 21:08:52\t<\/p>\n<h3><\/h3>\n<p>  \t\tcurl https:\/\/getcaddy.com | bash -s personal<br \/>  \u521b\u5efacaddy\u914d\u7f6e\u6587\u4ef6\u5b58\u653e\u76ee\u5f55\u548cssl\u8bc1\u4e66\u5b58\u653e\u76ee\u5f55\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n<p>  mkdir -p \/etc\/caddy &amp;&amp; mkdir -p \/etc\/ssl\/caddy<br \/>  \u65b0\u5efa\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n<p>  nano \/etc\/caddy\/Caddyfile<br \/>  \u5199\u5165\uff1a<\/p>\n<p>  hostloc.com {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; log stdout<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; tls example@qq.com<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; proxy \/phpmyadmin localhost:10086 {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; websocket<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; header_upstream -Origin<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; }<br \/>  }<br \/>  \u521b\u5efaSystemd\u670d\u52a1\u6587\u4ef6\uff1a<\/p>\n<p>  nano \/etc\/systemd\/system\/caddy.service<br \/>  \u5199\u5165\uff1a<\/p>\n<p>  Description=Caddy HTTP\/2 web server<br \/>  Documentation=https:\/\/caddyserver.com\/docs<br \/>  After=network-online.target<br \/>  Wants=network-online.target systemd-networkd-wait-online.service<\/p>\n<p>  Restart=on-abnormal<br \/>  User=root<br \/>  Group=root<br \/>  Environment=CADDYPATH=\/etc\/ssl\/caddy<br \/>  ExecStart=\/usr\/local\/bin\/caddy -log stdout -agree=true -conf=\/etc\/caddy\/Caddyfile -root=\/var\/tmp<br \/>  ExecReload=\/bin\/kill -USR1 $MAINPID<br \/>  KillMode=mixed<br \/>  KillSignal=SIGQUIT<br \/>  TimeoutStopSec=5s<\/p>\n<p>  WantedBy=multi-user.target<\/p>\n<p>  \u542f\u52a8\uff1a<\/p>\n<p>  systemctl start caddy<br \/>  systemctl enable caddy\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>cznet<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-8 20:24:00\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u8fd9\u4e0d\u662f\u5df2\u7ecf\u88c5\u597d\u4e86\u5417\uff0c\u76f4\u63a5systemctl start \u5c31\u53ef\u4ee5\u4e86\u5427\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u5e7d\u68a6\u5f71<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-8 20:27:07\t<\/p>\n<h3><\/h3>\n<p>  \t\tcznet \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-8 20:24<br \/>  \u8fd9\u4e0d\u662f\u5df2\u7ecf\u88c5\u597d\u4e86\u5417\uff0c\u76f4\u63a5systemctl start \u5c31\u53ef\u4ee5\u4e86\u5427<\/p>\n<p> \u6ca1\u6709\u88c5\u597d\uff0cstart\u547d\u4ee4\u540e\u518dstatus\u547d\u4ee4\u770b\uff0ccaddy in not installed\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>jpfree<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-8 20:28:25\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u6709 \u4e00\u952e\u811a\u672c\u554a\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u7f51\u7801\u4e91<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-8 20:29:45\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u8def\u8fc7\uff0c\u5b66\u4e60\u4e00\u4e0byc010t\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>yhfb66<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-8 20:30:21\t<\/p>\n<h3><\/h3>\n<p>  \t\tmarkmark\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u5e7d\u68a6\u5f71<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-8 20:30:57\t<\/p>\n<h3><\/h3>\n<p>  \t\tjpfree \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-8 20:28<br \/>  \u6709 \u4e00\u952e\u811a\u672c\u554a<\/p>\n<p> \u5143\u8001\u7528\u4e00\u952e\u811a\u672c\u5417\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>cznet<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-8 20:33:29\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u628a\/etc\/systemd\/system\/caddy.service\u6539\u4e2a\u540d\u518dinstall\u4e00\u4e0b\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>jpfree<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-8 20:45:48\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u4f60\u8fd9\u54ea\u91cc\u662f\u5b89\u88c5\u3002\u3002<br \/>  \u53ea\u662f\u670d\u52a1\u6ca1\u88c5\u597d\u800c\u5df2,\u771f\u8981\u624b\u52a8\u5b89\u88c5\u7684\u8bdd\uff0c\u5728GITHUB\u4e0a\u4e0b\u4e00\u4e2axx.sevice\u5c31\u53ef\u4ee5\u7528systemctl\u7ba1\u7406\u4e86\uff0c\u7528\u5565hook\u554a\u3002<br \/>  \u6ca1\u8bb0\u9519\u7684\u8bdd\uff0cCADDY\u57fa\u672c\u4e0d\u7528\u5b89\u88c5\uff0c\u76f4\u63a5\u8fd0\u884ccaddy\u5c31OK\u4e86\u3002\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5e7d\u68a6\u5f71 \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-&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\/39339"}],"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=39339"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/39339\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=39339"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=39339"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=39339"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}