Skip to content
View in the app

A better way to browse. Learn more.

Froxlor Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Nginx: adding limit_req_zone to top root of conf file?

Featured Replies

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

 

Depends in which context the directive has to be, if it's http{} you can just define it globally in the nginx.conf before the vhosts are included

  • Author

Thanks! - I tried that and it works fine (once I also add the domain-level directive like:

location / { limit_req zone=mylimit burst=20 nodelay; }

This will also help me understand how to add other nginx modules...

 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.