Files
Home_assistant/deploy/nginx-host-assistant.conf.example
T
2026-06-16 09:19:32 +03:00

42 lines
1.5 KiB
Plaintext
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.
# Пример для host nginx (Ubuntu) перед docker-compose.
# Ошибка «413 Request Entity Too Large» при загрузке скриншотов — нет client_max_body_size.
#
# Скопируйте фрагмент в server { } для assistant.your-domain.ru, затем:
# sudo nginx -t && sudo systemctl reload nginx
#
# Порты из .env: FRONTEND_PORT (3080), BACKEND_PORT (8202).
server {
listen 443 ssl http2;
server_name assistant.example.com;
# До 8 скриншотов за раз (VISION_MAX_IMAGES), с запасом на JPEG до preprocess
client_max_body_size 64m;
# ssl_certificate ...;
# ssl_certificate_key ...;
location /api/ {
proxy_pass http://127.0.0.1:8202;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
proxy_read_timeout 300s;
client_max_body_size 64m;
}
location / {
proxy_pass http://127.0.0.1:3080;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 300s;
client_max_body_size 64m;
}
}