# Nginx error_log 指令参考

URL: https://caijiao.org/reference/nginx/error-log
Source: docs/reference/nginx/error-log.md
Description: Nginx error_log 指令 Reference，整理配置语法、参数、示例、生效位置和常见错误。

Nginx error_log 指令 Reference，整理配置语法、参数、示例、生效位置和常见错误。

## 语法

```nginx
error_log value;
```

## 参数

- `path`：日志文件路径。
- `level / format`：错误级别或访问日志格式。

## 返回值

Nginx 指令本身不返回值，配置生效后改变请求处理、日志、安全头、缓存或性能行为。

## 示例

```nginx
server {
    listen 80;
    server_name example.com;
    error_log value;
}
```

## 常见错误

- 修改配置后先执行 `nginx -t`，通过后再 reload。
- 路径不存在或权限不足会导致启动、reload 或访问失败。

## 相关内容

- [Nginx 教程](/nginx/)
- [Linux / Docker 问题库](/how-to/linux-docker/)
- [Meta Title / Description 检查工具](/tool/meta-title-description-checker)
- [Open Graph 预览工具](/tool/open-graph-preview)
