Security
nginx
Advanced
Nginx Rate Limiting Config
Per-IP rate limiting in Nginx: burst allowed, delay enforced, login endpoint hardened.
nginx
limit_req_zone $binary_remote_addr zone=general:10m rate=10r/s;
limit_req_zone $binary_remote_addr zone=login:10m rate=5r/m;
server {
location / {
limit_req zone=general burst=20 nodelay;
}
location /api/login {
limit_req zone=login burst=3 nodelay;
limit_req_status 429;
}
}
Prerequisites
- Nginx >= 1.18
Pro Tips
- → Return 429 with Retry-After header using add_header.
Commercial Licensing
Acquire a production access token or template license for enterprise deployment.
Module Info
- Language
- nginx
- Level
- Advanced
- Read time
- 3 min
- Published
- Jan 2026
- License
- Commercial License
Newsletter
New modules every week, directly to your inbox.
Similar Modules
TOTP Two-Factor Auth
Generate and verify time-based one-time passwords (TOTP) compatible with Google Authenticator.
python
·
Advanced
Express CSRF Protection with Double Submit
Implement double-submit CSRF protection in Express without server-side session storage.
javascript
·
Intermediate
ClamAV Malware Scanner Cron
Run ClamAV on upload directory and quarantine infected files automatically.
bash
·
Advanced