{"id":396,"date":"2018-04-02T00:00:32","date_gmt":"2018-04-01T16:00:32","guid":{"rendered":"https:\/\/cloudbool.com\/archive\/?p=396"},"modified":"2018-04-02T00:00:32","modified_gmt":"2018-04-01T16:00:32","slug":"nginx-413-request-entity-too-large-error","status":"publish","type":"post","link":"https:\/\/cloudbool.com\/archive\/nginx-413-request-entity-too-large-error.html","title":{"rendered":"Nginx 413 Request Entity Too Large\u9519\u8bef"},"content":{"rendered":"<p>\u524d\u51e0\u5929\u8bf4\u4e86\uff0c<a href=\"https:\/\/cloudbool.com\/archive\/post\/gitea-nginx-ssl-mysql-config-git-server-note.html\">Gitea+Nginx+SSL+MySQL\u914d\u7f6eGit\u670d\u52a1\u5668\u8bb0\u5f55<\/a>\uff0c\u7528Nginx\u548cGitea\u642d\u5efa\u4e86\u4e00\u4e2agit\u4ed3\u5e93\uff0c\u4eca\u5929\u63a8\u9001\u7684\u65f6\u5019\uff0c\u53d1\u73b0\u4e00\u76f4\u5728\u62a5\u9519\uff0c\u4e8e\u662f\u82b1\u4e86\u70b9\u65f6\u95f4\u89e3\u51b3\u3002<br \/>\n<!--more--><br \/>\n\u672c\u6765\u6211\u662f\u7528<a href=\"https:\/\/cloudbool.com\/archive\/post\/git-gui-client-fork-recommend.html\">Fork\u5ba2\u6237\u7aef<\/a>\u8fdb\u884c\u64cd\u4f5c\u7684\uff0c\u6dfb\u52a0\u3001\u63d0\u4ea4\u4e4b\u540e\uff0c\u7136\u540e\u63a8\u9001\u5230\u670d\u52a1\u5668\u4e0a\uff0c\u4e00\u76f4\u62a5\u8fd9\u4e2a\u9519\u8bef\uff1a<\/p>\n<pre><code>fatal: The remote end hung up unexpectedly\n<\/code><\/pre>\n<p>\u5c31\u8fd9\u4e48\u4e00\u4e2a\u62a5\u9519\uff0c\u9519\u8bef\u4fe1\u606f\u4e0d\u660e\u4e0d\u767d\u7684\uff0c\u4e5f\u4e0d\u77e5\u9053\u5230\u5e95\u54ea\u91cc\u51fa\u9519\u4e86\uff0c\u6211\u4ee5\u4e3a\u662fNginx\u90a3\u8fb9\u8d85\u65f6\u4e86\uff0c\u56e0\u4e3a\u9ed8\u8ba4\u6ca1\u6709\u4fee\u6539Nginx\u7684timeout\u53c2\u6570\uff0c\u5e76\u4e14Nginx\u662f\u5c06\u8bf7\u6c42\u4f20\u7ed9Gitea\u7684\uff0c\u5c31\u52a0\u4e86\u51e0\u4e2a\u53c2\u6570\uff1a<\/p>\n<pre><code>proxy_connect_timeout 300;\nproxy_read_timeout      300;\nproxy_send_timeout      1000;\n<\/code><\/pre>\n<p>\u56e0\u4e3a\u6211\u4eec\u7684\u4ee3\u7801\u4ed3\u5e93\u6587\u4ef6\u6709\u70b9\u591a\uff0c\u6211\u7279\u610f\u589e\u5927\u4e86\u8fd9\u51e0\u4e2a\u503c\uff0c\u4ee5\u4e3a\u8fd9\u6837\u5c31\u4e0d\u4f1a\u62a5\u9519\u4e86\u3002<br \/>\n\u4e8e\u662f\u6362\u7528\u547d\u4ee4\u884c\u8fdb\u884c\u63d0\u4ea4\uff0c\u63d0\u4ea4\u7684\u65f6\u5019\u53d1\u73b0\uff0c\u591a\u4e86\u4e00\u4e2a\u62a5\u9519\uff1a<\/p>\n<pre><code>xxx:xxx zoco$ git push -u origin master\nCounting objects: 6027, done.\nDelta compression using up to 4 threads.\nCompressing objects: 100% (5817\/5817), done.\nerror: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large\nfatal: The remote end hung up unexpectedly\nWriting objects: 100% (6027\/6027), 187.00 MiB | 8.68 MiB\/s, done.\nTotal 6027 (delta 1701), reused 0 (delta 0)\nfatal: The remote end hung up unexpectedly\nEverything up-to-date\n<\/code><\/pre>\n<p>\u53ef\u4ee5\u770b\u51fa\uff0c\u662fHTTP\u7684413\u9519\u8bef\uff0c\u8fd9\u4e0b\u77e5\u9053\u4e86\u662f\u4e0a\u4f20\u7684\u6587\u4ef6\u8d85\u8fc7\u4e86Nginx\u7684\u6700\u5927\u6587\u4ef6\u9650\u5236\uff0c\u65e2\u7136\u77e5\u9053\u4e86\u5177\u4f53\u62a5\u9519\u539f\u56e0\uff0c\u6539\u4e0b\u53c2\u6570\u5c31\u53ef\u4ee5\u4e86\u3002<br \/>\nNginx\u914d\u7f6e\u6587\u4ef6\u52a0\u4e00\u884c\u6216\u8005\u66f4\u6539\u4e00\u4e0b\u5bf9\u5e94\u7684\u503c\uff0c\u5982\u679c\u662f\u7528<a href=\"https:\/\/cloudbool.com\/archive\/post\/linux-install-official-repo-nginx.html\">\u5305\u7ba1\u7406\u5668\u5b89\u88c5\u7684Nginx<\/a>\uff0c\u90a3\u914d\u7f6e\u6587\u4ef6\u5e94\u8be5\u662f<strong>\/etc\/nginx\/nginx.conf<\/strong>\uff0c\u5bf9\u5e94\u4fee\u6539\u5982\u4e0b\uff1a<\/p>\n<pre><code>client_max_body_size    400m;\n<\/code><\/pre>\n<p>\u540e\u9762\u7684400M\u53c2\u7167\u5b9e\u9645\u7684\u503c\u4fee\u6539\u5c31\u884c\uff0c\u6539\u597d\u4e4b\u540e\u91cd\u542fNginx\u5c31\u884c\u4e86\u3002<br \/>\n\u518d\u6b21\u63a8\u9001\uff0c\u53d1\u73b0\u80fd\u6b63\u5e38\u63a8\u9001\u6210\u529f\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u51e0\u5929\u8bf4\u4e86\uff0cGitea+Nginx+SSL+MySQL\u914d\u7f6eGit\u670d\u52a1\u5668\u8bb0\u5f55\uff0c\u7528Nginx\u548cGitea\u642d\u5efa\u4e86\u4e00\u4e2a &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/cloudbool.com\/archive\/nginx-413-request-entity-too-large-error.html\"> <span class=\"screen-reader-text\">Nginx 413 Request Entity Too Large\u9519\u8bef<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"footnotes":""},"categories":[183],"tags":[76],"class_list":["post-396","post","type-post","status-publish","format-standard","hentry","category-more","tag-nginx"],"_links":{"self":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts\/396","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/comments?post=396"}],"version-history":[{"count":0,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts\/396\/revisions"}],"wp:attachment":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/media?parent=396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/categories?post=396"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/tags?post=396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}