exception for NGINX limit_req_zone
fhal
meteor8488 at 163.com
Fri Jul 20 13:48:04 UTC 2012
I got a problem with NGINX limit_req_zone. Anyone can help? The problem is that, I want to limit user access to some specific URL, for example:
/forum.php?mod=forumdisplay?
/forum.php?mod=viewthread&***
But, I do want to add an exception for below URL,
/forum.php?mod=image&*
Below is the location section of my configuration, the problem is that, for URL started with /forum.php?mod=image&*, the limitation is still applied.
Any body can help?
location ~*^/forum.php?mod=image$ {
root /web/www;
fastcgi_pass unix:/tmp/nginx.socket;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
}
location ~*^/(home|forum|portal).php$ {
root /web/www;
limit_conn addr 5;
limit_req zone=refresh burst=5 nodelay;
fastcgi_pass unix:/tmp/nginx.socket;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
}
location ~ \.php$ {
root /web/www;
fastcgi_pass unix:/tmp/nginx.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20120720/60cf7a8d/attachment.html>
More information about the nginx
mailing list