[Varnish] #1812: Varnish 3.0.2 behind a SSL-Terminator
Varnish
varnish-bugs at varnish-cache.org
Fri Oct 30 18:56:48 CET 2015
#1812: Varnish 3.0.2 behind a SSL-Terminator
-----------------------------------+--------------------
Reporter: nixmind | Type: defect
Status: new | Priority: high
Milestone: | Component: build
Version: 3.0.2 | Severity: normal
Keywords: redirect, http, https |
-----------------------------------+--------------------
Hi
Please do someone know if **varnish 3.0.2** support http redirection to
https.
In fact I have a varnish cache server behind a ssl terminator (an aws
external loadbalancer on which I set a **http** and a **https** listener).
I would like the varnish when it receives a http request, to redirect in
https, and directly send back the response (resquest?) to the
loadbalancer, and the loadbalancer will receive the response as a
**https** request and forward it the varnih which will then forward it to
its own backend.
But it seems like my varnish cache don't redirect back to the loadbalancer
but redirect the https request to its backend.
However the backend behind the varnish I don't have a https backend, I get
timemout when I issue a http request.
When the client enter https in the browser it works. The problem is with
http request.
Here is my configuration :
In **vcl_recv** :
if (client.ip != "127.0.0.1" && server.port == 80 && req.http.host ~
"^(?i)mydomain.com") {
set req.http.x-redir = "https://" + req.http.host + req.url;
#return(synth(850, "Moved permanently"));
error 850 "Moved permanently";
}
In **vcl_error** :
if (obj.status == 850) {
set obj.http.Location = req.http.x-redir;
set obj.status = 302;
return (deliver);
}
Can someone help please. I can't upgrade my varnish version manually at
the moment.
Thanks
--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1812>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list