I have a Rails/Postgres app hosted on AWS Elastic Beanstalk. One form posting data to my app also allows users to select multiple photos, in which the photos are directly uploaded to Amazon S3 using Carrierwave in the same request. While it works in development, it throws a '413 Request Entity Is Too Large' error in production.
I've tried configuring my app with some of the suggestions on related Stack Overflow posts to increase the max body size of the request, but nothing seems to be working. Not sure if I should be using the container commands at all either. No idea what that's doing.
.ebextensions/01_files.config
container_commands:
01_reload_nginx:
command: "service nginx reload"
files:
"/etc/nginx/conf.d/proxy.conf" :
mode: "000755"
owner: root
group: root
content: |
http {
client_max_body_size 20M;
}