Add tracked nginx reverse-proxy template for llama-server — previously only existed as a heredoc run live on BigBoy; also resolves the server_name wildcard conflict warning
This commit is contained in:
parent
647834e63e
commit
3f5c8562dd
1 changed files with 39 additions and 0 deletions
39
ansible/templates/llama.conf.j2
Normal file
39
ansible/templates/llama.conf.j2
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# llama.conf — nginx reverse proxy for BigBoy's llama-server
|
||||
#
|
||||
# This is a Jinja2 template (Ansible's `template` module convention),
|
||||
# ready to use once Phase 5 is formalized into an actual Ansible role.
|
||||
# Until then, it's the tracked, reproducible reference for what's
|
||||
# actually configured live on BigBoy — this previously existed only as
|
||||
# a heredoc typed directly during the deployment session, never
|
||||
# committed anywhere.
|
||||
#
|
||||
# Manual deployment (until this is wired into a real Ansible role):
|
||||
# 1. Fill in the Jinja2 variables below with their actual values
|
||||
# 2. Copy the rendered result to /etc/nginx/conf.d/llama.conf
|
||||
# 3. sudo nginx -t (confirm syntax before reloading)
|
||||
# 4. sudo systemctl reload nginx
|
||||
#
|
||||
# NOTE on server_name: the first live deployment used `server_name _;`
|
||||
# (the catch-all wildcard) and hit a harmless-but-noisy warning —
|
||||
# "conflicting server name "_" on 0.0.0.0:80, ignored" — because
|
||||
# AlmaLinux's stock nginx package already ships its own default catch-all
|
||||
# server block using the same wildcard. This template uses the actual
|
||||
# host IP instead, avoiding the duplicate entirely rather than just
|
||||
# tolerating the warning.
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name {{ ip_address }};
|
||||
|
||||
location / {
|
||||
proxy_pass http://{{ llama_server_host }}:{{ llama_server_port }};
|
||||
|
||||
# Required for llama-server's streaming (server-sent event)
|
||||
# responses — without these, chat responses arrive all at once
|
||||
# instead of streaming token-by-token.
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
proxy_buffering off;
|
||||
proxy_read_timeout 300s;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue