Configuration file measurement units (original) (raw)

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 theg or G suffixes.

Time intervals

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

ms milliseconds
s seconds (default)
m minutes
h hours
d days
w weeks
M months, 30 days
y years, 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”.