简体   繁体   English

AWS ElasticBeanstalk Amazon Linux 2 .platform 文件夹不复制 NGINX conf

[英]AWS ElasticBeanstalk Amazon Linux 2 .platform folder not copying NGINX conf

I've been moving over to ElasticBeanstalk using Amazon Linux 2 and I'm having a problem overwriting the default nginx.conf file.我一直在使用 Amazon Linux 2 迁移到 ElasticBeanstalk,但在覆盖默认的 nginx.conf 文件时遇到了问题。 I'm following the AL2 docs for the reverse proxy.我正在关注反向代理的AL2 文档

They say, "To override the Elastic Beanstalk default nginx configuration completely, include a configuration in your source bundle at .platform/nginx/nginx.conf:"他们说,“要完全覆盖 Elastic Beanstalk 默认 nginx 配置,请在 .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'."" “Elastic Beanstalk 忽略了您的 '.ebextensions/nginx' 配置目录。要包含这些配置文件,请将它们移动到 '.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.我已经尝试完全删除 .ebextensions 文件夹并得到相同的错误。

I've tried starting from a completely fresh beanstalk environment and still got that error.我试过从一个全新的 beanstalk 环境开始,但仍然遇到那个错误。 I'm not understanding how beanstalk is managing this.我不明白 beanstalk 是如何管理这个的。

Based on the comments.根据评论。

The issue was caused by duplicate locations of the nginx config file.该问题是由nginx配置文件的重复位置引起的。 This was due to deleting the nginx default path in .ebextensions , while EB re-creating it.这是由于删除了.ebextensions的 nginx 默认路径,而 EB 重新创建了它。

Since this seems as a bug, AWS support ticked was created.由于这似乎是一个错误,因此创建了 AWS 支持勾选。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM