【问题标题】:example Rate limiting configuration of nginx in beanstalkbeantalk中nginx的限速配置示例
【发布时间】:2022-01-29 23:26:51
【问题描述】:

我试图在 nginx conf 中设置速率限制,我在 ./platform/nginx/conf.d/custom.conf 文件中做了以下操作

http {
    limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;
    server {
        location / {
            limit_req zone=one;
            limit_req_dry_run on;
        }
    }
}

但它不起作用,我做错了什么?

【问题讨论】:

    标签: nginx amazon-elastic-beanstalk rate-limiting


    【解决方案1】:

    我最终通过创建一个文件替换了完整的 nginx.conf .platform/nginx/conf.d/nginx.conf 。它取代了 BeanStalk 的默认 nginx 设置。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-01-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-31
      • 2022-12-13
      • 1970-01-01
      相关资源
      最近更新 更多