Files
knowledge-base/projects/dttb/npm-proxy-hosts.md
dttb 42d1b4ad85 NPM: troubleshooting disk-full LXC 103 (git push 500), защита логов
Корень падения git push по HTTPS: диск NPM 100% забит логами host-22
(trust_forwarded_proto warning флуд). Truncate + cron npm-log-cap (>200M).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 01:54:23 +03:00

135 lines
7.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
date: 2026-02-26
type: project
tags: [dttb, npm]
---
# 🌐 Nginx Proxy Manager — Proxy Hosts
> **NPM LXC:** 103 (10.0.0.195)
> **Панель:** https://npm.dttb.ru
>
> Последнее обновление: 2026-06-27 (добавлен dash.dttb.ru → Homepage Dashboard LXC 145)
---
## Сводка
| Всего хостов | С SSL | Без SSL | Активных |
|--------------|-------|---------|----------|
| 25 | 21 | 4 | 25 |
---
## Proxy Hosts
| # | Домен | Backend (IP:Port) | SSL | Forced | WSS | HTTP/2 | Назначение |
|---|-------|-------------------|-----|--------|-----|--------|------------|
| 1 | `dttb.ru` | 10.0.0.230:11001 | ✅ Let's Encrypt | ✅ | ✅ | ✅ | Главный сайт |
| 2 | `office.dttb.ru` | 10.0.0.169:8080 | ✅ | ❌ | ✅ | ❌ | Офисное приложение |
| 3 | `itilegent.ru` | 10.0.0.223:8080 | ✅ Let's Encrypt | ✅ | ✅ | ✅ | ITIL Elegant |
| 4 | `npm.dttb.ru` | 10.0.0.195:81 | ✅ Let's Encrypt | ✅ | ✅ | ❌ | NPM панель управления |
| 5 | `porteiner.dttb.ru` | 10.0.0.10:9443 (HTTPS) | ✅ | ❌ | ✅ | ❌ | Portainer |
| 6 | `pve.dttb.ru` | 10.0.0.250:8006 (HTTPS) | ✅ Let's Encrypt | ✅ | ✅ | ✅ | Proxmox VE WebUI |
| 9 | `ai.dttb.ru` | 10.0.0.179:8080 | ✅ | ✅ | ✅ | ✅ | AI-сервис |
| 10 | `bit.dttb.ru` | 10.0.0.217:8080 | ✅ | ✅ | ✅ | ✅ | Bitrix |
| 11 | `link.dttb.ru` | 10.0.0.184:3000 | ✅ | ❌ | ✅ | ❌ | LinkWarden |
| 12 | `bitrix24.dttb.ru` | 10.0.0.223:8080 | ✅ | ✅ | ✅ | ❌ | Bitrix24 + Matrix (.well-known) |
| 13 | `ip.dttb.ru` | 10.0.0.112:8840 | ✅ | ✅ | ✅ | ✅ | IP-камера/сервис |
| 14 | `remot.dttb.ru` | 10.0.0.43:21114 | ✅ | ❌ | ✅ | ❌ | RustDesk Web |
| 15 | `plex.dttb.ru` | 10.0.0.200:32400 | ✅ Let's Encrypt | ❌ | ✅ | ❌ | Plex Media Server |
| 16 | `home.dttb.ru` | 10.0.0.155:8123 | ✅ | ❌ | ✅ | ❌ | Home Assistant |
| 17 | `z.dttb.ru` | 10.0.0.220:80 | ✅ | ✅ | ❌ | ✅ | Z-сервис (Zabbix?) |
| 28 | `bot.dttb.ru` | 10.0.0.239:18789 | ✅ Let's Encrypt | ✅ | ✅ | ✅ | **OpenClaw Gateway** (LXC 137) |
| 21 | `rec.dttb.ru` | 10.0.0.227:8091 | ✅ Let's Encrypt | ✅ | ❌ | ❌ | Запись/NVR |
| 22 | `git.dttb.ru` | 10.0.0.189:3000 | ❌ | ❌ | ✅ | ❌ | Gitea |
| 23 | `matrix.dttb.ru` | 10.0.0.224:8080 | ✅ Let's Encrypt | ✅ | ✅ | ✅ | Matrix/Element Web |
| 25 | `mail.dttb.ru` | 10.0.0.107:443 (HTTPS) | ✅ Let's Encrypt | ✅ | ❌ | ✅ | Mailcow Web UI |
| 29 | `omni.dttb.ru` | 10.0.0.179:20128 | ✅ Let's Encrypt | ✅ | ✅ | ✅ | **OmniRoute Dashboard** (LXC 132) |
| 32 | `swarm.dttb.ru` | 10.0.0.135:3456 | ✅ Let's Encrypt | ✅ | ✅ | ✅ | **SwarmClaw** (LXC 135) — оркестратор над openclaw |
| 30 | `omni.umnybot.ru` | 10.0.0.163:20128 | ✅ Let's Encrypt | ✅ | ✅ | ❌ | OmniRoute коробки Алекса (pve-147 LXC 102) |
| 31 | `zima.umnybot.ru` | 10.0.0.190:80 | ✅ Let's Encrypt | ✅ | ✅ | ❌ | ZimaOS NAS коробки Алекса (pve-147 VM 100) |
| 33 | `tg.umnybot.ru` | 10.0.0.190:3000 | ✅ Let's Encrypt | ✅ | ✅ | ❌ | Telegram web (KasmVNC, ZimaOS) — Basic Auth ACL `umnybot-kasm` |
| 34 | `rustdesk.umnybot.ru` | 10.0.0.190:3005 | ✅ Let's Encrypt | ✅ | ✅ | ❌ | RustDesk client web (KasmVNC, ZimaOS) — Basic Auth ACL `umnybot-kasm` |
| 36 | `unifi.dttb.ru` | 10.0.0.196:8443 (HTTPS) | ✅ Let's Encrypt | ✅ | ✅ | ✅ | **UniFi Network Application** (LXC 140) |
| 39 | `chat.dttb.ru` | 10.0.0.142:3000 | ✅ Let's Encrypt (id129) | ✅ | ✅ | ✅ | **Open WebUI** (LXC 142) — веб-клиент поверх OmniRoute |
| 40 | `german.dttb.ru` | 10.0.0.141:9119 | ✅ Let's Encrypt (id130) | ✅ | ✅ | ✅ | **Hermes Dashboard** (LXC 141) — веб-панель German; basic_auth `oleg`, см. credentials |
| 41 | `auth.dttb.ru` | 10.0.0.144:9000 | ✅ Let's Encrypt (id133) | ✅ | ✅ | ✅ | **authentik SSO/IdP** (LXC 144) — единый вход + 2FA. См. [[../../decisions/2026-06-26-authentik-sso-deploy]] |
| 42 | `dash.dttb.ru` | 10.0.0.148:3000 | ✅ Let's Encrypt (id134) | ✅ | ✅ | ✅ | **Homepage Dashboard** (LXC 145) — карта инфры + live-виджеты; **Basic Auth** `oleg`/`OL260380eg` (access-list 5); authentik forward-auth отложен. См. [[../../decisions/2026-06-27-homepage-dashboard-lxc145]] |
---
## Расширенные конфигурации
### bitrix24.dttb.ru — Matrix Federation
Содержит custom Advanced config для Matrix:
```nginx
location /.well-known/matrix/server {
return 200 '{"m.server":"bitrix24.dttb.ru:8448"}';
add_header Content-Type application/json;
add_header Access-Control-Allow-Origin *;
}
location /.well-known/matrix/client {
return 200 '{"m.homeserver":{"base_url":"https://bitrix24.dttb.ru"},"m.identity_server":{"base_url":"https://vector.im"}}';
add_header Content-Type application/json;
add_header Access-Control-Allow-Origin *;
}
```
Дополнительный location: `/_matrix``10.0.0.223:8008` (Matrix Synapse API)
### bot.dttb.ru — Clawdbot
Дополнительный location: `/ask``10.0.0.206:18790` (Siri/Ask endpoint)
---
## Карта Backend IP → Домены
| Backend IP | Порт | Домен(ы) |
|------------|------|----------|
| 10.0.0.10 | 9443 | porteiner.dttb.ru |
| 10.0.0.43 | 21114 | remot.dttb.ru |
| 10.0.0.112 | 8840 | ip.dttb.ru |
| 10.0.0.141 | 9119 | german.dttb.ru (Hermes Dashboard) |
| 10.0.0.142 | 3000 | chat.dttb.ru (Open WebUI) |
| 10.0.0.144 | 9000 | auth.dttb.ru (authentik SSO/IdP) |
| 10.0.0.155 | 8123 | home.dttb.ru |
| 10.0.0.169 | 8080 | office.dttb.ru |
| 10.0.0.179 | 8080, 20128 | ai.dttb.ru, omni.dttb.ru |
| 10.0.0.184 | 3000 | link.dttb.ru |
| 10.0.0.189 | 3000 | git.dttb.ru |
| 10.0.0.195 | 81 | npm.dttb.ru |
| 10.0.0.200 | 32400 | plex.dttb.ru |
| 10.0.0.206 | 18789, 18790 | bot.dttb.ru, siri.dttb.ru |
| 10.0.0.217 | 8080 | bit.dttb.ru |
| 10.0.0.220 | 80 | z.dttb.ru |
| 10.0.0.223 | 8080, 8008 | bitrix24.dttb.ru, itilegent.ru |
| 10.0.0.227 | 8091 | rec.dttb.ru |
| 10.0.0.224 | 8080, 8008 | matrix.dttb.ru |
| 10.0.0.230 | 11001 | dttb.ru |
| 10.0.0.250 | 8006 | pve.dttb.ru |
| 10.0.0.107 | 443 | mail.dttb.ru |
| 10.0.0.135 | 3456 | swarm.dttb.ru |
---
## SSL-сертификаты
Большинство сертификатов выданы через Let's Encrypt с email `it5870@yandex.ru`.
---
## Troubleshooting
### git push даёт HTTP 500 / API NPM 502 → диск LXC 103 переполнен (2026-06-28)
**Симптом:** `git push` на git.dttb.ru → `RPC failed; HTTP 500`, при этом GET'ы проксируются (200); админ-API NPM (:81) → 502.
**Корень:** диск LXC 103 (NPM) был **100% забит** → nginx не может буферизировать тело POST (push) на диск, node-app не пишет → 500/502. GET'ы маленькие, проходят.
**Что забило:** логи прокси-хоста 22 (`git.dttb.ru`): `proxy-host-22_access.log` 601M + `error.log` 568M. error.log флудит варнинг NPM `using uninitialized "trust_forwarded_proto" variable` на каждый запрос (баг NPM), диск всего 7.8G.
**Фикс:** truncate логов (`: > файл`, не rm — nginx держит хэндл) → освободилось ~1.2G. Защита от повтора: `/usr/local/bin/npm-log-cap.sh` + cron `/etc/cron.d/npm-log-cap` (hourly, обрезает любой NPM-лог > 200M до последних 10M in-place).
**Обход на время диск-фула:** push напрямую в Gitea минуя NPM — SSH-туннель `ssh -L 3000:10.0.0.189:3000 root@10.0.0.250`, затем `git push http://oleg:***@localhost:3000/oleg/knowledge-base.git`.
**Остаётся (корень):** варнинг trust_forwarded_proto (обновить NPM) и/или вырастить диск 7.8G (`pct resize 103 rootfs +8G`).