gpt4 book ai didi

codeigniter - 如何在运行 docker 实例的亚马逊弹性 beanstalk 中更改 nginx 配置

转载 作者:IT老高 更新时间:2023-10-28 12:37:12 25 4
gpt4 key购买 nike

在我登录并设置 cookie 后,我收到错误 502。当我阅读日志时,我收到错误:

014/05/17 01:54:43 [error] 11013#0: *8 upstream sent too big header while reading response
header from upstream, client: 83.248.134.236, server: , request: "GET /administration
HTTP/1.1", upstream:

经过一番快速谷歌搜索后,我发现: http://developernote.com/2012/09/how-i-fixed-nginx-502-bad-gateway-error/

我想尝试将 fastcgi_buffers 和 fastcgi_buffer_size 设置为不同的值。但是我如何在亚马逊 elasticbeanstalk 中的 nginx 上设置变量?

nginx 服务器在我的 docker 实例之前。

最佳答案

亚马逊实际上建议编辑 nginx 部署文件的暂存版本。有几个位于 /tmp/deployment/config/,一个用于编辑一般的“http”上下文,还有一些用于配置服务器的不同方面。

我想将缓存功能附加到默认代理服务器,所以我编写了一个 .ebextensions 配置文件来替换 #etc#nginx#conf.d#00_elastic_beanstalk_proxy.conf,然后在部署期间复制到 /etc/nginx/conf.d。如果文件足够简单,您可以内联该文件,但我将我的文件放在 S3 中,以便不同的应用程序将其拉下并使用它。这是配置文件:

commands: 
01-get-nginx-conf-file:
command: aws s3 cp s3://<bucket-name>/custom-nginx.conf /home/ec2-user

container_commands:
01-replace-default-nginx-config:
command: mv -f /home/ec2-user/custom-nginx.conf /tmp/deployment/config/#etc#nginx#conf.d#00_elastic_beanstalk_proxy.conf

关于codeigniter - 如何在运行 docker 实例的亚马逊弹性 beanstalk 中更改 nginx 配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23709841/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com