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”.