阶段2(下):运维专题 Docker/Nginx/Linux/CI-CD/Git 的课程、企业场景、面试题和可运行示例

This commit is contained in:
Shikui Wang committed 2026-10-23 15:36:06 +08:00
1 parent 5eb67c5d08
commit b8010a74f3
42 files changed
+3533 -55

No files matched your search

+30 -3
View File
@@ -4,12 +4,39 @@ title: Nginx
type: index
domain: devops
stack: [nginx]
tags: []
tags: [Nginx, 反向代理, HTTPS, 负载均衡, SSE]
week: [3, 7, 14]
---
# Nginx
反向代理、静态资源、HTTPS、SSE / WebSocket、限流、灰度。
前端出身的你对 Nginx 应该不陌生(部署 SPA、配置代理)。转后端 / AI 应用后要再往前走一步:反向代理和负载均衡、HTTPS、**大模型流式输出(SSE)的代理配置**、限流、灰度发布,以及常见 502/504 问题的排查。
> 本专题建设中:课程、企业场景、面试题和示例代码会陆续补充。
## 学习路线
| 顺序 | 课程 | 级别 | 预计 |
| --- | --- | --- | --- |
| 1 | [反向代理、负载均衡和静态资源:location 匹配、proxy_pass、SPA 回退](01-proxy-static.md) | 基础 | 2 小时 |
| 2 | [HTTPS、SSE / WebSocket、限流和灰度](02-https-stream-limit.md) | 进阶 | 3 小时 |
## 企业场景
- [AI 应用网关:流式输出不卡顿、按用户灰度新版本](scenarios/ai-gateway-sse-canary.md)
## 面试题
- [Nginx 面试题](interview.md)
## 示例代码
- [examples/gateway](examples/gateway/):网关配置模板 + pytest 测试,用真实 Nginx 验证反向代理、SPA 回退、SSE 不缓冲、限流、Cookie 灰度(本机没有 nginx 时测试自动跳过)
## 在 16 周计划中
- [第 3 周:项目一部署](../../../plan/week03-project1.md)、[第 7 周:前端部署](../../../plan/week07-frontend.md)、[第 14 周:部署](../../../plan/week14-backend-extend-deploy.md)
## 官方资料
- Nginx 文档:https://nginx.org/en/docs/
- 代理模块参数:https://nginx.org/en/docs/http/ngx_http_proxy_module.html
- 限流模块:https://nginx.org/en/docs/http/ngx_http_limit_req_module.html