{"id":294,"date":"2023-02-24T21:58:52","date_gmt":"2023-02-24T13:58:52","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=294"},"modified":"2023-04-30T15:10:54","modified_gmt":"2023-04-30T07:10:54","slug":"post-request-to-access-nginx-static-resources-reporting-405-not-allowed-error","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/02\/24\/post-request-to-access-nginx-static-resources-reporting-405-not-allowed-error\/","title":{"rendered":"Post\u8bf7\u6c42\u8bbf\u95eeNginx\u9759\u6001\u8d44\u6e90\uff0c\u62a5405 not allowed\u9519\u8bef"},"content":{"rendered":"<p>Post\u8bf7\u6c42\u8bbf\u95eeNginx\u9759\u6001\u8d44\u6e90\uff0c\u4f1a\u62a5<code>405 not allowed<\/code>\u9519\u8bef\u3002\u4e3a\u4e86\u8ba9Nginx\u9759\u6001\u9875\u9762\u80fd\u591f\u54cd\u5e94post\u8bf7\u6c42<\/p>\n<p>\u89e3\u51b3\u65b9\u6848\uff1a\u4fee\u6539<code>nginx.conf<\/code>\u914d\u7f6e\u6587\u4ef6\uff0c\u5728<code>server{}<\/code>\u4e2d\u6dfb\u52a0<code>error_page 405=200@405<\/code><\/p>\n<p><!-- more --><\/p>\n<pre><code>error_page  405 =200 @405;\nlocation @405 {\n    proxy_method GET;\n    proxy_pass http:\/\/localhost:80;\n}<\/code><\/pre>\n<p><code>proxy_pass http:\/\/<\/code>\u53ef\u4ee5\u6539\u6210\u57df\u540d\u6216\u8005\u670d\u52a1\u5668\u5730\u5740\u3002<\/p>\n<p>\u8be5\u5904\u7406\u76f8\u5f53\u4e8e\u5c06405\u9519\u8bef\u7684post\u8bf7\u6c42\u6539\u6210get\u8bf7\u6c42\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Post\u8bf7\u6c42\u8bbf\u95eeNginx\u9759\u6001\u8d44\u6e90\uff0c\u4f1a\u62a5405 not allowed\u9519\u8bef\u3002\u4e3a\u4e86\u8ba9Nginx\u9759\u6001\u9875\u9762\u80fd\u591f\u54cd\u5e94p [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-294","post","type-post","status-publish","format-standard","hentry","category-java","tag-nginx"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/294","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=294"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/294\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}