简体   繁体   中英

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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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