Elastic Beanstalk 服务器有重复的上游“nodejs”,有时会失败

alb*_*rtk 6 nginx amazon-web-services amazon-elastic-beanstalk

我的弹性 beanstalk node.js 服务器有时在我部署它时工作,然后一段时间后它会失败并失去与我连接到的子域的连接。

我需要 https 和证书,所以我添加了一个像 api.website.com 这样的子域,这样我就可以拥有它。

我在日志中得到的错误是

duplicate upstream "nodejs" in /etc/nginx/conf.d/proxy.conf:9

然后当我在添加 https 重定向配置文件后尝试重新部署时:https://github.com/awsdocs/elastic-beanstalk-samples/blob/master/configuration-files/aws-provided/security-configuration/https-重定向/nodejs/https-redirect-nodejs.config

我在日志中收到此消息

duplicate MIME type "text/html" in /etc/nginx/conf.d/proxy.conf:50

我的默认环境 url 有效,但我的 api 子域无效。

当我转到我的网址时,我看到

api.*******.com’s server IP address could not be found.

我将我的子域和名称服务器连接到我的域提供商 DNS,它有时可以工作。我的主 url 也连接到弹性 beantalk 环境,没有问题。

我不知道问题是什么。

它有时可以工作,然后一段时间后它会失败并且子域失去连接或其他东西。我有时也会看到“重复上游”错误。

任何的想法?