Справочник
UI, env и API
Разделы панели
| Раздел | Что настраивается |
|---|---|
| Dashboard | RPS, алерты сертификатов, WAF summary, live stats |
| Сайты | vhost, SSL, locations, canary, mirror, stream, error pages, cache purge |
| Безопасность сайта | headers, geo, ACL, auth, mTLS, honeypot, challenge, WAF preset |
| Upstream | LB, health, drain, keepalive, добавление серверов |
| Сертификаты | LE issue/renew, DNS-01, алерты |
| WAF | CRS, IP rules, policy, bots, custom rules, патчи |
| Графики | timeseries, домены, upstream, bot scores |
| Docker | stacks, discovery, wizard, drift |
| Импорт | parse/adopt host configs, certificates |
| Конфиг nginx | preview, test, apply, revisions, rollback |
| Логи | tail, search access/error/WAF |
| Настройки | access guard, webhooks, error pages, security hardening, users |
Переменные окружения (prod)
# Core
DATABASE_URL=postgres://...
JWT_SECRET=...
NGINX_MODE=docker
NGINX_CONTAINER=smart-nginx-edge
API_INTERNAL_URL=http://api:8080
SITE_AUTH_INTERNAL_SECRET=...
# WAF
WAF_DATA_DIR=/data/waf
WAF_LOG_PATH=/var/log/nginx/smart-nginx/waf-audit.json
WAF_AUTO_BLOCK_ENABLED=true
WAF_AUTO_BLOCK_TTL=24h
WAF_BOT_PROTECTION_ENABLED=true
WAF_BOT_RATE_LIMIT_RPS=20
# Analytics
ACCESS_LOG_PATH=/var/log/nginx/smart-nginx/access.json
GEOIP_DB_PATH=/data/geoip/GeoLite2-Country.mmdb
REST API
Базовый URL: /adm-panel/api/ (prod) или http://localhost:8080/api/ (dev). Auth: Authorization: Bearer <JWT>.
POST /api/auth/login
GET/POST /api/sites, /api/sites/{id}/features, /api/sites/{id}/locations/{lid}
POST /api/nginx/apply, /api/nginx/test, POST /api/nginx/revisions/{id}/rollback
GET/PUT /api/waf/bot-protection, /api/waf/threat-policy, /api/waf/ip-rules
GET/PUT /api/settings/security, /api/settings/access-guard
POST /api/upstreams/{id}/servers, POST .../drain?apply=true
POST /api/sites/{id}/cache/purge?host=&path=
GET /api/analytics/dashboard, /api/waf/dashboard
Полный список маршрутов — в api/cmd/server/main.go.