Configuration file measurement units

Sizes and offsets
Time intervals

nginx supports several measurement units for specifying sizes, offsets, and time intervals within configuration files.

Sizes and offsets

Sizes can be specified in bytes, kilobytes, or megabytes using the following suffixes:

For example, “1024”, “8k”, “1m”.

Offsets can be also specified in gigabytes using the g or G suffixes.

Time intervals

Time intervals can be specified in milliseconds, seconds, minutes, hours, days and so on, using the following suffixes:

msmilliseconds
sseconds (default)
mminutes
hhours
ddays
wweeks
Mmonths, 30 days
yyears, 365 days

Multiple units can be combined in a single value by specifying them in the order from the most to the least significant, and optionally separated by whitespace. For example, “1h 30m” specifies the same time as “90m” or “5400s”.