From edee6c183273c60c93cca770400347d630e102f3 Mon Sep 17 00:00:00 2001 From: ElvisIsKing666 <166011086+ElvisIsKing666@users.noreply.github.com> Date: Tue, 1 Jul 2025 12:36:34 +0100 Subject: [PATCH] Update readme.md - move client_max_body_size directive in server block client_max_body_size only works in server block, not location --- readme.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/readme.md b/readme.md index 3eb4cef7a..9bf73176b 100644 --- a/readme.md +++ b/readme.md @@ -108,6 +108,11 @@ server { ssl_certificate /path/to/certificate; ssl_certificate_key /path/to/key; + # Prevent 413 Request Entity Too Large error + # by increasing the maximum allowed size of the client request body + # For example, set it to 10 GiB + client_max_body_size 10240M; + location / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; @@ -119,11 +124,6 @@ server { proxy_pass http://; proxy_redirect http:// https://; - - # Prevent 413 Request Entity Too Large error - # by increasing the maximum allowed size of the client request body - # For example, set it to 10 GiB - client_max_body_size 10240M; } } ```