How to use ngx_http_limit_conn_module to rate-limit connections to NGINX

Solution Verified - Updated -

Issue

  • How can I limit the number of connections to my NGINX server by client IP -- e.g., to allow only 2 connections per client?

  • How can I set a limit on the number of total connections to a particular website configured in NGINX?

  • Is ngx_http_limit_conn_module included and supported in NGINX as shipped by Red Hat?

Environment

  • rh-nginx18 package from Red Hat Software Collections (RHSCL)
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content