<div dir="ltr">I don't understand the <a href="https://github.com/varnish/hitch/wiki/FAQ#redirect-varnish-http-clients-to-https" target="_blank">this FAQ topic</a>.<br><div class="gmail_quote"><div dir="ltr"><p>
I want to implement it. In my <code>/etc/varnish/default.vcl</code> I have this:</p>
<pre><code>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 ~ "<a href="http://domain1.com" target="_blank">domain1.com</a>") {
set req.backend_hint = apache;
}
elsif(req.http.host == "<a href="http://domain2.com" target="_blank">domain2.com</a>") {
set req.backend_hint = node_hello;
}
}
</code></pre>
<p>How should my implementation become?</p><br></div>
</div><br></div>