From 6804354ab590eb275c323763f25c9eb8297f6370 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Thu, 2 Jun 2022 04:45:49 +0100 Subject: [PATCH] Use dynamic variable for varnish proxy_pass. --- template/pipedapi.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/template/pipedapi.conf b/template/pipedapi.conf index e039caf..da4447d 100644 --- a/template/pipedapi.conf +++ b/template/pipedapi.conf @@ -2,8 +2,10 @@ server { listen 80; server_name BACKEND_HOSTNAME; + set $backend "http://varnish:80"; + location / { - proxy_pass http://varnish:80; + proxy_pass $backend; proxy_http_version 1.1; proxy_set_header Connection "keep-alive"; }