nginx - Rate Limiter not working for index page? -


i using location block php

location ~ \.php$ {   try_files $uri =404;   limit_req zone=limit burst=3 nodelay;   fastcgi_pass php_farm;   include nginx.fastcgi.conf; } 

if go localhost/testxxx.php , start f5 spamming, limit_req work properly. but, if go localhost , start refreshing/f5, nothing happens , doesn't activate limit_req, idea? seems it's not catching main index.php file because it's not shown in url? (localhost) no trailing slash? idea how catch index.php inside location block?

yes! found fix after reviewing awesome article: https://www.digitalocean.com/community/tutorials/understanding-nginx-server-and-location-block-selection-algorithms

i added below location block:

location = / {             limit_req zone=limit burst=3 nodelay;         } 

and catches 'localhost' url!


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -