Using user defined variable in backend definition?

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

On Mon, Aug 24, 2020 at 11:07 PM Dridi Boukelmoune <dridi at> 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.


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: <>

More information about the varnish-misc mailing list