Jump to content
Froxlor Forum
  • 0

Nginx: adding limit_req_zone to top root of conf file?

Duane Raymond


Hi. I'm trying to add rate limiting to the nginx server via froxlor. This seems to mean:

  1. At the root of the .conf file is a line: limit_req_zone $binary_remote_addr zone=mylimit:10m rate=10r/s;
  2. In each relevant location is a line: limit_req zone=mylimit burst=20 nodelay;

 By adding the location line to my domains vhost in froxlor it correctly re-generates the .conf file with the 'limit_req' line.  However adding the limit_req_zone at the root level in the vhost config via froxlor adds it to the bottom of the .conf file, which causes the nginx server reload/start to fail.

I'm manually added it at root level of the .conf file, and nginx restart/reloads with no errors.  Is there a way (besides manually editing it on each server restart) to do this with froxlor now? Perhaps an include file with the details (but that would put it outside froxlor's conf file generation)?

See nginx example/documentation at http://nginx.org/en/docs/http/ngx_http_limit_req_module.html


Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...