我在项目中上传大图像时遇到问题,我的配置是用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请求实体太大?


基础教程推荐
猜你喜欢
- Ruby3多线程并行Ractor使用方法详解 2023-07-23
- Swift初始化器与可选链的使用方法介绍 2023-07-08
- ruby-on-rails-为使用Rails 4,nginx和乘客的用户设置自定义域 2023-09-21
- R语言-修改(替换)因子变量的元素操作 2022-11-26
- win10下使用virtualbox + vagrant配置ruby开发机环境 2023-07-23
- R语言绘制折线图实例分析 2022-11-21
- R语言 ggplot2改变柱状图的顺序操作 2022-11-17
- Swift中重写和重载的使用与对比总结 2023-07-05
- ruby on rails validates 2023-09-22
- 浅析ELF转二进制允许把 Binary 文件加载到任意位置 2023-07-06