> For the complete documentation index, see [llms.txt](https://docshome.gitbook.io/nginx-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docshome.gitbook.io/nginx-docs/readme/pei-zhi-wen-jian-du-liang-dan-wei.md).

# 配置文件度量单位

度量单位可以是字节、千字节（单位是 k 或者 K ）或者兆字节（单位是 m 或者 M ），例如，`1024`，`8k`，`1m`。

也可以使用 g 或者 G 单位的千兆字节。

可以指定毫秒、秒、分、小时和天等时间来设定时间间隔，使用以下单位：

| 单位 | 含义     |
| -- | ------ |
| ms | 毫秒     |
| s  | 秒      |
| m  | 分钟     |
| h  | 小时     |
| d  | 天      |
| w  | 周      |
| M  | 月，30天  |
| y  | 年，365天 |

可以从大到小的顺序指定多个单位，用可选的空格符间隔组合成单个值。例如，`1h 30m` 与 `90m` 或者 `5400s` 时间相同。没有单位的值表示秒，建议始终加上单位。

某些时间设置只能区分秒级单位。

## 原文档

<http://nginx.org/en/docs/syntax.html>
