AWS Elastic Beanstalk-请求实体太大(413) [英] AWS Elastic Beanstalk - Request Entity Too Large (413)

查看:127
本文介绍了AWS Elastic Beanstalk-请求实体太大(413)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将基于节点的Web服务部署到弹性beantalk,但是在发布过多数据时遇到问题.问题似乎出在nginx层,而不是Node/express层.我收到的消息是:

I am trying to deploy a Node-based web service to elastic beanstalk but running into problems when posting too much data. The issue seems to be at the nginx layer, not the Node / express layer. The message I get is:

<html>
  <head><title>413 Request Entity Too Large</title></head>
  <body bgcolor="white">
    <center><h1>413 Request Entity Too Large</h1></center>
    <hr><center>nginx/1.6.2</center>
  </body>
</html>

基于StackOverflow的其他答案,我在项目的根目录中添加了一个名为.ebextensions的文件夹,并在其中添加了一个名为nginx.config的文件.该文件的内容为:

Based on other answers on StackOverflow, I added a folder to the root of my project called .ebextensions and a file inside called nginx.config. The contents of this file are:

files:
    "/etc/nginx/conf.d/proxy.conf" :
        mode: "000755"
        owner: root
        group: root
        content: |
           client_max_body_size 50M;

我将其与节点应用程序一起部署,甚至重新启动了应用程序服务器.到目前为止,它似乎没有任何作用.我在做错什么吗?

I deployed this along with my node application and even restarted the app server. So far it seems to have no effect. Am I doing something wrong?

推荐答案

我弄清楚了问题所在.当我发布到AWS时,.ebextensions文件夹隐藏在我的文件系统中,并且没有包含在我的部署ZIP中.

I figured out what the issue was. The .ebextensions folder was hidden in my file system and was not being included in my deployment ZIP when I published to AWS.

这篇关于AWS Elastic Beanstalk-请求实体太大(413)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆