Menu

Recommend how to restrict location per ip?

2013-09-23
2013-09-23
  • Ken Williams

    Ken Williams - 2013-09-23

    I'm trying to restrict a URL from being hit too many times to fast. I added this to the <vhost> to limit requests to /url/ to 1 per second with a max of 4 concurrent connections:

      QS_LocRequestPerSecLimitMatch "^(/url/).*$"    1
      QS_LocRequestLimitMatch "^(/url/).*$"    4
    

    Is this global for all IP's or per IP? I would like to restrict the number of simultaneous connects to /url/ to 1 per second for each IP, not total for the vhost. I don't know if the above applies per IP or not. Any help would be great.

    Thanks.

     
  • Pascal Buchbinder

    The QS_Loc* directives limit the total number of requests to the server.

    The same configuration on a per client IP basis could look like this:

    SetEnvIf RequestURI ^/url/ QS_EventRequest
    QS_ClientEventRequestLimi 4
    SetEnvIf RequestURI ^/url/ QS_Event
    QS_ClientEventPerSecLimit 1
    
     

    Last edit: Pascal Buchbinder 2013-09-23

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.