AWS ElasticBeanstalk Amazon Linux 2 .platform文件夹未复制NGINX conf [英] AWS ElasticBeanstalk Amazon Linux 2 .platform folder not copying NGINX conf

查看:105
本文介绍了AWS ElasticBeanstalk Amazon Linux 2 .platform文件夹未复制NGINX conf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用Amazon Linux 2迁移到ElasticBeanstalk,但覆盖默认的nginx.conf文件时遇到问题.我正在跟踪

虽然运行部署时出现错误

  CommandService响应:{"status":"FAILURE","api_version":"1.0","results":[[{"status"":"FAILURE","msg":"引擎执行遇到错误.",返回码":1,事件":[{"msg":"实例部署:Elastic Beanstalk忽略了您的".ebextensions/nginx"配置目录.要包括这些配置文件,请将它们移至".platform/nginx".,时间戳":1598554657,严重性":"WARN"},{"msg":实例部署失败.有关详细信息,请参见"eb-engine.log".",时间戳记":1598554682,严重性":错误"}]}]}} 

错误的主要部分是

" Elastic Beanstalk忽略了您的'.ebextensions/nginx'配置目录.要包括这些配置文件,请将它们移至".platform/nginx"."

我很困惑,因为这是我放置文件/文件夹的地方.

我尝试完全删除.ebextensions文件夹,并得到相同的错误.

我尝试从一个全新的beantalk环境开始,但仍然遇到该错误.我不明白beantalk如何管理这个问题.

解决方案

基于评论.

此问题是由 nginx 配置文件的重复位置引起的.这是由于在EB重新创建时删除了 .ebextensions 中的nginx默认路径.

由于这似乎是一个错误,因此创建了对AWS支持的信息.

I've been moving over to ElasticBeanstalk using Amazon Linux 2 and I'm having a problem overwriting the default nginx.conf file. I'm following the AL2 docs for the reverse proxy.

They say, "To override the Elastic Beanstalk default nginx configuration completely, include a configuration in your source bundle at .platform/nginx/nginx.conf:"

My apps folder structure

When I run my deploy though, I get the error

CommandService Response: {"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"Engine execution has encountered an error.","returncode":1,"events":[{"msg":"Instance deployment: Elastic Beanstalk ignored your '.ebextensions/nginx' configuration directory. To include these configuration files, move them to '.platform/nginx'.","timestamp":1598554657,"severity":"WARN"},{"msg":"Instance deployment failed. For details, see 'eb-engine.log'.","timestamp":1598554682,"severity":"ERROR"}]}]}

The main part of the error is

"Elastic Beanstalk ignored your '.ebextensions/nginx' configuration directory. To include these configuration files, move them to '.platform/nginx'.""

Which I'm confused about because this is where I've put the file/folder.

I've tried completely removing the .ebextensions folder and got the same error.

I've tried starting from a completely fresh beanstalk environment and still got that error. I'm not understanding how beanstalk is managing this.

解决方案

Based on the comments.

The issue was caused by duplicate locations of the nginx config file. This was due to deleting the nginx default path in .ebextensions, while EB re-creating it.

Since this seems as a bug, AWS support ticked was created.

这篇关于AWS ElasticBeanstalk Amazon Linux 2 .platform文件夹未复制NGINX conf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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