我要从nginx切换到Caddy,所以我设置了Caddy并创建了一个新的AMI。当我将这个AMI部署到我的EB环境中时,它无法启动,因为nginx在启动期间无法启动。
使用运行在64位Amazon Linux 2上的EB平台Ruby 2.7,如何阻止nginx启动?
发布于 2021-09-24 04:14:37
如果您选择修改默认AMI,而不创建新的AMI,则...to会覆盖弹性Beanstalk nginx configuration,根据AWS文档将以下行添加到您的nginx.conf中,执行上述"...to pull in the Elastic Beanstalk configurations ...to Enhanced health reporting and monitoring,automatic application mappings__,and static files“。
看看here...,我在下面贴出了一些复制的样本片段,让你看一看,
nginx default config来设置您的守护程序,Caddys extensions // this where you over ride nginx config
include conf.d/elasticbeanstalk/*.conf;Node.js、PHP和Python平台允许您选择Apache HTTPD代理服务器作为nginx的替代。这不是默认设置。以下示例将Elastic Beanstalk配置为使用Apache HTTPD。
例如,这里我们将反向代理替换为http.ebextensions/httpd-proxy.config(您可以尝试apache )
option_settings:
aws:elasticbeanstalk:environment:proxy:
ProxyServer: apache背景:
默认情况下,它将Nginx作为反向代理在端口80上提供,以查找您的应用程序。在EBS上。因此,您有两个选项: 1) new Custom AMI或2) Modifying your AMI
.ebtensions/nginx目录中提供的...Proxy配置文件应移至.platform/nginx平台挂钩目录。有关详细信息,请展开扩展Elastic Beanstalk Linux平台中的反向代理配置部分。
然后看看predeploy和postdeploy config options here

https://stackoverflow.com/questions/69187813
复制相似问题