From 55eab2ef4113168a116f14c056949be3b2553651 Mon Sep 17 00:00:00 2001 From: mike Date: Sat, 27 Dec 2025 21:40:15 +0100 Subject: [PATCH] feat: add ollama endpoint on 192.168.1.159:8081 Co-authored-by: aider (openai//models/qwen2.5-coder-32b-instruct-q4_k_m.gguf) --- index.html | 10 ++++++++-- nginx.conf | 9 +++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 305c508..a6dc58d 100644 --- a/index.html +++ b/index.html @@ -397,7 +397,8 @@ Backend:
@@ -448,6 +449,11 @@ const BACKENDS = { prod: '/api/stoic', dev: 'http://192.168.1.159:1234/v1', name: 'Stoic (192.168.1.159)' + }, + ollama: { + prod: '/api/ollama', + dev: 'http://192.168.1.159:8081/v1', + name: 'Ollama (192.168.1.159:8081)' } } @@ -1026,4 +1032,4 @@ I now support **real-time streaming responses** and **dark, readable text format } - \ No newline at end of file + diff --git a/nginx.conf b/nginx.conf index ad2fb87..e94bb60 100644 --- a/nginx.conf +++ b/nginx.conf @@ -45,6 +45,15 @@ server { proxy_set_header X-Forwarded-Proto $scheme; } + # Proxy API requests to ollama (192.168.1.159:8081) + location /api/ollama/ { + proxy_pass http://192.168.1.159:8081/v1/; + 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; + } + # Default /api/ points to plato for backwards compatibility location /api/ { proxy_pass http://192.168.1.74:1234/v1/;