Files

26 lines
1.1 KiB
Django/Jinja
Raw Permalink Normal View History

2026-10-02 21:34:01 +04:00
{% for item in dnsmasq %}
{% set short_name = item.name.split('.')[0] %}
server {
listen 127.0.0.1:{{ item.backend_port }} ssl ipv6only=off reuseport;
server_name {{ item.name }};
index index.html;
root {{ placeholders[placeholder].root }};
http2 on;
ssl_certificate /etc/letsencrypt/live/{{ item.name }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ item.name }}/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
client_header_timeout 5m;
keepalive_timeout 5m;
access_log /var/log/nginx/{{ short_name }}_access.log;
error_log /var/log/nginx/{{ short_name }}_error.log;
location {{ xray_xhttp_path }} {
client_max_body_size 0;
grpc_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_body_timeout 5m;
grpc_read_timeout 315;
grpc_send_timeout 5m;
grpc_pass {{ item.socket }};
}
}
{% endfor %}