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
Post a Comment