茫茫網海中的冷日 - 對這文章發表回應
茫茫網海中的冷日
         
茫茫網海中的冷日
發生過的事,不可能遺忘,只是想不起來而已!
 恭喜您是本站第 1672744 位訪客!  登入  | 註冊
主選單

Google 自訂搜尋

Goole 廣告

隨機相片
IMG_60D_00004.jpg

授權條款

使用者登入
使用者名稱:

密碼:


忘了密碼?

現在就註冊!

對這文章發表回應

發表限制: 非會員 可以發表

發表者: 冷日 發表時間: 2019/3/30 1:16:04
Default nginx client_max_body_size

I have been getting the nginx error:
413 Request Entity Too Large

I have been able to update my client_max_body_size in the server section of my nginx.conf file to 20M and this has fixed the issue. However, what is the default nginx client_max_body_size?



The default value for client_max_body_size directive is 1 MiB.
It can be set in http, server and location context — as in the most cases, this directive in a nested block takes precedence over the same directive in the ancestors blocks.
Excerpt from the ngx_http_core_module documentation:
    Syntax:   client_max_body_size size;
    Default:  client_max_body_size 1m;
    Context:  http, server, location

Sets the maximum allowed size of the client request body, specified in the “Content-Length” request header field. If the size in a request exceeds the configured value, the 413 (Request Entity Too Large) error is returned to the client. Please be aware that browsers cannot correctly display this error. Setting size to 0 disables checking of client request body size.
Don't forget to reload configuration by nginx -s reload or service nginx reload commands prepending with sudo (if any).



You can increase body size in nginx configuration file as
    sudo nano /etc/nginx/nginx.conf
    client_max_body_size 100M;

Restart nginx to apply the changes.
    sudo service nginx restart




Pooja Mane's answer worked for me, but I had to put the client_max_body_size variable inside of http section.


原文出處:Default nginx client_max_body_size - Stack Overflow
內容圖示
url email imgsrc image code quote
樣本
bold italic underline linethrough   












 [詳情...]
validation picture

注意事項:
預覽不需輸入認證碼,僅真正發送文章時才會檢查驗證碼。
認證碼有效期10分鐘,若輸入資料超過10分鐘,請您備份內容後,重新整理本頁並貼回您的內容,再輸入驗證碼送出。

選項

Powered by XOOPS 2.0 © 2001-2008 The XOOPS Project|