将大于10MB的文件发布到AWS Elastic Beanstalk上运行的API时,我遇到"413 Request Entity Too Large"错误.
我做了很多研究,并且相信我需要为Nginx 启动client_max_body_size,但是我似乎无法找到有关如何使用Elastic Beanstalk执行此操作的任何文档.我的猜测是需要使用ebetension文件进行修改.
任何人都有关于如何达到极限的想法?10MB非常弱,必须有一种方法可以手动启动它.
nginx amazon-ec2 amazon-web-services amazon-elastic-beanstalk
在我登录并设置cookie后,我得到错误502.当我读取日志时,我收到错误:
014/05/17 01:54:43 [error] 11013#0: *8 upstream sent too big header while reading response
header from upstream, client: 83.248.134.236, server: , request: "GET /administration
HTTP/1.1", upstream:
Run Code Online (Sandbox Code Playgroud)
经过一些快速的谷歌搜索,我发现:http: //developernote.com/2012/09/how-i-fixed-nginx-502-bad-gateway-error/
我想尝试将fastcgi_buffers和fastcgi_buffer_size设置为不同的值.但是如何在amazon elasticbeanstalk中设置nginx变量?
nginx服务器在我的docker实例之前.
codeigniter nginx amazon-web-services docker amazon-elastic-beanstalk
我有一个问题,nginx似乎忽略(或覆盖)我在AWS Elastic Beanstalk上的Ubuntu Docker容器中的upped client_max_body_size指令.这会阻止用户上传任何大于nginx默认值1MB的文件.
我使用了client_max_body_size 10M; 在http,服务器和位置块无济于事,我仍然看到nginx日志中的"客户端意图发送太大的身体"错误.我已经在AWS EC2 Ubuntu实例上成功使用了这些设置,但由于在Docker容器中使用相同的设置,我遇到了这个问题.我也试过使用这里概述的ebextension 在AWS Elastic Beanstalk上的Nginx conf中增加client_max_body_size
应用程序本身是在Tomcat容器中运行的CFML(Railo).
以下是相关的nginx文件:
完整的未删节文件在这里https://github.com/chapmandu/docker-railo
提前致谢.
2014/12/02 03:02:05 [error] 32116#0: *142 client intended to send too large body: 1290803 bytes, client: 172.31.19.39, server: , request: "POST /listings/35602/images/create HTTP/1.1", host: "staging.svr.com.au", referrer: "http://staging.svr.com.au/listings/35602/images/new"
Run Code Online (Sandbox Code Playgroud)
daemon off;
worker_processes 1;
events {
worker_connections 1024;
}
http {
client_max_body_size 10M;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
include /etc/nginx/sites-enabled/default;
}
Run Code Online (Sandbox Code Playgroud)
server
{
listen 80;
server_name localhost;
client_max_body_size …Run Code Online (Sandbox Code Playgroud)