Dont understand how to implement this FAQ topic
Guillaume Quintard
guillaume at varnish-software.com
Fri Apr 13 21:57:14 UTC 2018
What is your goal, what don't you understand?
--
Guillaume Quintard
On Fri, Apr 13, 2018, 23:52 Daniel Santos <dannysantos1985 at gmail.com> wrote:
> I don't understand the this FAQ topic
> <https://github.com/varnish/hitch/wiki/FAQ#redirect-varnish-http-clients-to-https>
> .
>
> I want to implement it. In my /etc/varnish/default.vcl I have this:
>
> backend apache {
> .host = "127.0.0.1";
> .port = "5555";
> }
>
> backend node_hello {
> .host = "127.0.0.1";
> .port = "5556";
> }
>
> import std;
>
> sub vcl_recv {
> # Happens before we check if we have this in cache already.
> #
> # Typically you clean up the request here, removing cookies you don't need,
> # rewriting the request, etc.
>
> if ((std.port(local.ip) == 6086) && (std.port(server.ip) == 443)) {
> set req.http.X-Forwarded-Proto = "https";
> }
>
> if(req.http.host ~ "domain1.com") {
> set req.backend_hint = apache;
> }
> elsif(req.http.host == "domain2.com") {
> set req.backend_hint = node_hello;
> }
> }
>
> How should my implementation become?
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20180413/c4b05cbe/attachment.html>
More information about the varnish-misc
mailing list