Also Do we know if option http_proxy will re-encrypt the req after SSL
termination and is it meant for HTTPS?
listen http_proxy-1000
bind *:1000 ssl test.pem
mode http
option httplog
http-request set-uri https://%[url_param(redirHost)]%[capture.req.uri]
option http_proxy
The reason being the following works but we can't really use it for plain proxy
setup since server's in the backend are fixed:
listen http_proxy-1000
bind *:1000 ssl test.pem
mode http
option httplog
server backUp <backendHost>:5100 ssl check backup verify none
Any help will be highly appreciated.
Thanks,
Praveen.
-----Original Message-----
From: UPPALAPATI, PRAVEEN
Sent: Tuesday, May 08, 2018 12:25 AM
To: 'Aleksandar Lazic' <[email protected]>; Willy Tarreau <[email protected]>
Cc: Olivier Houchard <[email protected]>; [email protected]
Subject: 502 Bad Gateway
Hi Haproxy-Team,
I have the following configuration:
listen http_proxy-1000
bind *:1000
mode http
option httplog
http-request set-uri https://%[url_param(redirHost)]%[capture.req.uri]
option http_proxy
If I issue a request to that port :
https://<haproxyHost>:1000
/test/test.txt?Host=<desthost>:8093
I get <BadReq>
If I add ssl termination to the config:
listen http_proxy-1000
bind *:1000 ssl test.pem
mode http
option httplog
http-request set-uri https://%[url_param(redirHost)]%[capture.req.uri]
option http_proxy
I get :
http-9876~ bk_9876/<NOSRV> 0/0/1/-1/2 502 211 - - PH-- 1/1/0/0/0 0/0 "GET
/test/test.txt?idnsredirHost=<destinationhost>:5300 HTTP/1.1"
I have also set :
ssl-server-verify none
@global still no luck.
Let me know if I am missing anything .
Thanks,
Praveen.
-----Original Message-----
From: Aleksandar Lazic [mailto:[email protected]]
Sent: Tuesday, May 01, 2018 7:22 AM
To: UPPALAPATI, PRAVEEN <[email protected]>; Willy Tarreau <[email protected]>
Cc: Olivier Houchard <[email protected]>; [email protected]
Subject: Re: Logging Question
Hi.
Am 30.04.2018 um 19:05 schrieb UPPALAPATI, PRAVEEN:
>
> Hi Willy/Oliver,
>
> One small question:
>
> When I capture the header it's returning xxxx.com in the log but when I
> perform Get on xxxx.com:1000 it is not matching the following configuration.
>
> frontend http-1000
> bind *:1000
> option httplog
> capture request header Host len 20
> acl is_east hdr(host) -i xxxx.com
Maybe this helps?
acl is_east hdr_beg(host) -i xxxx.com
> use_backend east_bk_1000_read if is_east
>
> My question is how can I print o/p of hdr(host) & is_east to log?
>
> Appreciate your help.
>
> Thanks,
> Praveen.
Regards
Aleks