{"id":1439,"date":"2018-03-27T16:46:21","date_gmt":"2018-03-27T08:46:21","guid":{"rendered":"http:\/\/ykyi.net\/?p=1439"},"modified":"2018-03-27T16:46:21","modified_gmt":"2018-03-27T08:46:21","slug":"nginx%e6%9e%b6%e8%ae%behttp%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%8e%a5%e5%8f%97put%e6%96%b9%e6%b3%95%e4%b8%8a%e4%bc%a0%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/ykyi.net\/?p=1439","title":{"rendered":"nginx\u67b6\u8bbeHTTP\u670d\u52a1\u5668\u63a5\u53d7PUT\u65b9\u6cd5\u4e0a\u4f20\u6587\u4ef6"},"content":{"rendered":"<p>\u6700\u8fd1\u7528nginx\u67b6\u4e86\u4e2ahttp\u670d\u52a1\u5668\uff0c\u901a\u8fc7http\u4e0a\u4f20\u6587\u4ef6\u3002<br \/>\nnginx\u7684\u914d\u7f6e\u5982\u4e0b\uff1a<\/p>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-null\">        location ~ ^\/wraith {\n            root \/data\/tmp;\n            dav_methods PUT;\n            dav_access user:r group:r all:r;\n            create_full_put_path on;\n\n            limit_except GET {\n            }\n        }\n<\/code><\/pre>\n<p>\u5982\u4e0a\uff0c\u5b50\u76ee\u5f55\/wraith\u5c06\u63a5\u53d7PUT\u65b9\u6cd5\u3002<\/p>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-null\">$curl -XPUT --data-binary @${TAR_PATH} --noproxy '*'  http:\/\/xxx.xxx.xxx.xxx\/wraith\/${TAR_FILE}\n<\/code><\/pre>\n<p>\u5982\u4e0a\u7528curl\u901a\u8fc7http\u4e0a\u4f20\u6587\u4ef6\u5230\u670d\u52a1\u5668\u7684\/data\/tmp\u76ee\u5f55\u4e0b\uff0c\u6587\u4ef6\u547d\u540d\u4e3a${TAR_FILE}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u7528nginx\u67b6\u4e86\u4e2ahttp\u670d\u52a1\u5668\uff0c\u901a\u8fc7http\u4e0a\u4f20\u6587\u4ef6\u3002 nginx\u7684\u914d\u7f6e\u5982\u4e0b\uff1a location ~ ^\/wraith { root \/data\/tmp; dav_methods PUT; dav_access user:r group:r all:r; create_full_put_path on; limit_except GET { } } \u5982\u4e0a\uff0c\u5b50\u76ee\u5f55\/wraith\u5c06\u63a5\u53d7PUT\u65b9\u6cd5\u3002 $curl -XPUT &#8211;data-binary @${TAR_PATH} &#8211;noproxy &#8216;*&#8217; http:\/\/xxx.xxx.xxx.xxx\/wraith\/${TAR_FILE} \u5982\u4e0a\u7528curl\u901a\u8fc7http\u4e0a\u4f20\u6587\u4ef6\u5230\u670d\u52a1\u5668\u7684\/data\/tmp\u76ee\u5f55\u4e0b\uff0c\u6587\u4ef6\u547d\u540d\u4e3a${TAR_FILE}<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,9],"tags":[61],"class_list":["post-1439","post","type-post","status-publish","format-standard","hentry","category-tech_articles","category-web-2","tag-nginx"],"_links":{"self":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/posts\/1439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1439"}],"version-history":[{"count":0,"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/posts\/1439\/revisions"}],"wp:attachment":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}