Common Stanzas

This module contains functions and variables that provide a variety of commonly used nginx config boilerplate.


These are some decent default settings for gzip compression


These are some larger than default buffer settings.

Use at your own risk!


These are some good defaults to supply to Nginx when using the statsd plugin.

NB! it requires you to include a “statsd_server” directive in your http section. This set of common directives should go in any Location block.


A set of useful defaults for using nginx’s response cache with uWSGI

This block of options belongs in your HTTP section.

NB! you must set “set $nocache 0;” in the Location block of your uwsgi backend.



These are some decent defaults for caching uwsgi responses


Rcreate rate limit shared memory zone, used for tracking different connections.

Parameters:qps (int|str) – Queries per second to rate limit.

This needs to be added to a location block in order for that location to get rate limiting

Parameters:burst_qps (int|str) – Queries per second to allow bursting to.