Using user defined variable in backend definition?

Batanun B batanun at hotmail.com
Tue Aug 25 09:18:22 UTC 2020


On Mon, Aug 24, 2020 at 11:07 PM Dridi Boukelmoune <dridi at varni.sh> wrote:

> Hi,
>
> You can't do that, but you can move the backend definition inside
> environment.vcl instead to keep your default.vcl the same across all
> environments.

Hi,

Too bad... Strange thing to require hard coded strings. Is there a technical reason for that?

Yeah, I actually ended up doing just that, moving the entire backend definition to the separate file. But I would have preferred having the base structure in the main vcl file, and only the actual host names (and other environment specific configuration) in the separate vcl file. Also, if they were variables, I would be able to use them elsewhere in the vcl (like in synth output, which was my main goal originally). If I want to do that now, I would have to define the same host name multiple times.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20200825/b7fc7ca4/attachment-0001.html>


More information about the varnish-misc mailing list