我在项目中上传大图像时遇到问题,我的配置是用puma和RoR.我在elasticbeanstalk中的用户是ec2-user.我尝试过很多我看过的配置,但它无法正常工作. .ebextensions中的文件就像这样:files:/etc/nginx/conf.d/proxy.co...
我在项目中上传大图像时遇到问题,我的配置是用puma和RoR.我在elasticbeanstalk中的用户是ec2-user.
我尝试过很多我看过的配置,但它无法正常工作. .ebextensions中的文件就像这样:
files:
"/etc/nginx/conf.d/proxy.conf" :
mode: "000777"
owner: root
group: root
content: |
client_max_body_size 4G;
其他配置,但它不起作用
files:
"/etc/nginx/conf.d/proxy.conf" :
mode: "000755"
owner: ec2-user
group: ec2-user
content: |
client_max_body_size 50M;
该文件已创建但未成功.有什么建议?谢谢.
解决方法:
我已经解决了我的问题,我不得不在http中添加:client_max_body_size
files:
"/etc/nginx/conf.d/proxy.conf" :
mode: "000755"
owner: root
group: root
content: |
http {
client_max_body_size 20M;
}
沃梦达教程
本文标题为:ruby-on-rails – 如何在Nginx和Amazon ElasticBeanstalk中解决错误413请求实体太大?
基础教程推荐
猜你喜欢
- Ruby on Rails在Ping ++ 平台实现支付 2023-07-22
- R语言多元线性回归实例详解 2022-12-15
- go语言的魔幻旅程14-反射 2023-09-05
- golang 自然语言处理工具(gohanlp) 2023-09-05
- R语言关联规则深入详解 2022-11-08
- ruby-on-rails – Nginx支持的Rails应用程序中缺少Content-Length Header 2023-09-20
- R语言histogram(直方图)的具体使用 2022-10-28
- R语言学习代码格式一键美化 2022-12-05
- Go语言实现一个Http Server框架(二) Server的抽象 2023-07-25
- R语言使用gganimate创建可视化动图 2022-12-10
