There are a lot of answers to this problem (question 1 question 2) but this solution that should work, doesn't work for me:
files:
"/etc/nginx/conf.d/proxy.conf" :
mode: "000755"
owner: root
group: root
content: |
client_max_body_size 50M;
I have checked the status and contents of this created file via ssh and its correct. I also have tried other values and restarted the server multiple times.
client_max_body_size 0;
or
http {
client_max_body_size 50M;
}
This values do not work either.
it just wont work, even with "just" a 6mb image. it work with smaller images around size of 0.5mb. It's a RoR app with "64bit Amazon Linux 2018.03 v2.8.0 running Ruby 2.5 (Puma)". The instance size is t2.micro.
What does “413 Request Entity Too Large” mean? A 413 HTTP error code occurs when the size of a client's request exceeds the server's file size limit. This typically happens when a client attempts to upload a large file to a web server, and the server responds with a 413 error to alert the client.
Try this. It worked for me:
content: |
server {
***your server configuration***
location / {
client_max_body_size 100M;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With