【问题标题】:Elastic Beanstalk's nginx configuration not workingElastic Beanstalk 的 nginx 配置不起作用
【发布时间】:2018-12-29 21:30:06
【问题描述】:

我已经在 .ebextensions/nginx/conf.d/test.conf 后面添加了 nginx test.conf 文件 doc

我已确认文件是从日志中复制的。我已正确遵循所有内容,但未添加文件。

# Node.js version: 8.11.1 running on 64bit Amazon Linux/4.5.0
# eb activity logs from my instance
creating: /tmp/deployment/application/.ebextensions/
inflating: /tmp/deployment/application/.ebextensions/https-instance.config
creating: /tmp/deployment/application/.ebextensions/nginx/
creating: /tmp/deployment/application/.ebextensions/nginx/conf.d/
inflating: /tmp/deployment/application/.ebextensions/nginx/conf.d/test.conf

2018 年 9 月 5 日更新

# Some configuration of nginx can be by placing files in /etc/nginx/conf.d
# using Configuration Files.
# http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/customize-containers.html 
# 
# Modifications of nginx.conf can be performed using container_commands to modify 
  the staged version located in /tmp/deployment/config/etc#nginx#nginx.conf

# For more information on configuration, see:
#   * Official English Documentation: http://nginx.org/en/docs/
#   * Official Russian Documentation: http://nginx.org/ru/docs/

【问题讨论】:

  • 你找到解决办法了吗?
  • @RaúlFerràs 目前还没有,如果我对我的 nginx.conf 文件进行了一些更改,我将手动进行

标签: amazon-web-services nginx amazon-ec2 amazon-elastic-beanstalk


【解决方案1】:

如果您使用的是 Node.js 容器,则应改为阅读此文档:

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/nodejs-platform-proxy.html

你链接的是Java容器;)

【讨论】:

  • 糟糕!你能帮我提供有关如何覆盖主 nginx.conf 的任何链接,因为我必须向 nginx 添加流支持
  • 我发布的链接向您解释了如何覆盖它。如果您特别询问如何添加流支持,那么抱歉我不知道。
  • 该链接解释了覆盖conf.d文件下的文件,但不是主要的nginx conf文件,并且在conf.d文件夹下添加文件也适用于node js,但不能覆盖nginx.conf .
猜你喜欢
  • 2021-11-24
  • 2015-02-23
  • 2019-09-24
  • 2020-08-27
  • 2014-11-22
  • 2021-04-16
  • 2021-08-22
  • 2020-11-05
  • 2017-04-01
相关资源
最近更新 更多