【问题标题】:Create apache.config in .ebextensions but it does not work在 .ebextensions 中创建 apache.config 但它不起作用
【发布时间】:2021-11-28 20:44:48
【问题描述】:

我在 .ebextensions 中创建了一个 apache.config 来扩展 apache 的 keep-alive 设置,但在我的实例中我看不到 /etc/httpd/conf.d 中的文件。我的尝试是这样的:

我的实例版本:Amazon Linux 2/3.3.5

files:
    "/etc/httpd/conf.d/timeout.conf" :
        mode: "000644"
        owner: root
        group: root
        content: |
            Timeout 300
            KeepAliveTimeout 300
xxxxxxx@ip-172-30-2-176 current]$ ls -l /etc/httpd/conf.d
total 0
drwxr-xr-x 2 root root 62 Oct  9 02:59 elasticbeanstalk

另外,我已经运行 httpd -t -D DUMP_CONFIG 2>/dev/null | grep -v '#' 来检查这些值,但这些值是 60(默认值)。

对我可能做错的任何建议? 非常感谢您提前提供的帮助。

【问题讨论】:

    标签: apache amazon-elastic-beanstalk httpd.conf


    【解决方案1】:

    我自己决定更改创建 timeout.conf 文件并将其移动到 .platform 文件夹中,像这样。

    我不知道为什么,但我的情况是,我把它放在 elasticbeanstalk 文件夹中,以便与弹性 beanstalk 中的 conf 一起使用。

    ~/my-app/
    |-- .ebextensions/
    |
    `-- .platform/
        |-- httpd/
            |-- conf.d
                |-- elasticbeanstalk
                    |-- timeout.conf
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-02-01
      • 2018-05-31
      • 2022-06-14
      • 2019-11-03
      • 1970-01-01
      • 2018-05-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多