Increase proxy upload limit to 50 MB

This commit is contained in:
2026-09-01 14:59:13 +08:00
parent 7b009a3ddc
commit 2e00bf8213
2 changed files with 12 additions and 0 deletions
+1
View File
@@ -597,6 +597,7 @@ public sealed class NginxManager
sb.AppendLine($" access_log {nginxAccessLog};");
sb.AppendLine($" error_log {nginxErrorLog} warn;");
sb.AppendLine(" keepalive_timeout 65;");
sb.AppendLine(" client_max_body_size 50m;");
sb.AppendLine();
if (!string.IsNullOrWhiteSpace(_config.PortalDomain))
+11
View File
@@ -21,6 +21,7 @@ NginxMan 主要用于:
- **主页内容设置**:通过弹窗维护入口页名称、主页标题和主页简介,并提供可恢复的默认文字示例。
- **映射管理**:支持新增、修改和删除域名反向代理映射。
- **可配置端口**:入口页和每条代理映射均可使用 `1–65535` 范围内的端口。
- **上传大小**:生成的 Nginx 配置将请求体上限设置为 50 MB,适用于全部入口页和代理映射。
- **配置生成**:根据界面数据自动生成 `data/nginx.conf`。
- **进程控制**:可以启动、重新加载和停止 Nginx,并显示当前运行状态。
- **入口页生成**:根据所有代理映射自动生成 `data/www/index.html`。
@@ -135,6 +136,16 @@ app.example.com -> 服务器 IP
- 同一服务器上不能让两个不同程序同时占用相同的 IP 和端口组合。
- 入口页不能与某条代理映射使用完全相同的域名和监听端口。
## 上传大小说明
Nginx 未配置 `client_max_body_size` 时默认只允许 1 MB 请求体。NginxMan 生成的配置会在 `http` 范围写入:
```nginx
client_max_body_size 50m;
```
因此所有代理映射的单次上传请求体上限为 50 MB。修改后,如果 Nginx 已经运行,请点击“重新加载”使配置生效。
## 界面按钮说明
| 按钮 | 作用 |