
當我想在微堆疊上建立圖像時出現 413 錯誤。先致謝
你好,
我的錯誤 413 是我在 microstack fraichement 安裝上創建的映像。
感謝您的助手
弗雷德里克
<html> <head><title>413 Request Entity Too Large</title></head> <body bgcolor="white"> <center><h1>413 Request Entity Too Large</h1></center> <hr><center>nginx/1.13.0</center> </body> </html>
答案1
在裡面文件你會發現nginx限制了伺服器區塊的檔案大小上傳。
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.
編輯文件sudo vim /etc/nginx/nginx.conf
或
sudo vim /var/snap/microstack/common/etc/nginx/snap/nginx.conf
:
將 http client_max_body_size 設定為大於您想要的 iso 的大小。
http {
...
client_max_body_size 2000M;
}
現在通過
sudo systemctl reload nginx
或重新啟動它sudo snap restart microstack