Update:
I was able to solve for this by using Apache ProxyRemote Option. Here
is the working test configuration of Apache.
<VirtualHost *:80>
SSLProxyEngine On
SSLProxyCheckPeerCN on
SSLProxyCheckPeerExpire on
RewriteRule / https://remote.domain [P]
ProxyRemote "*" https://proxyIp:proxyPort
ProxyPass / https://remote.domain
</VirtualHost>
The POC configuration which worked for me is
Client => Haproxy => Apache => Squid => ELB
Unlike what many blogs listed, ProxyRemote worked without ProxyRequests on.
I tried researching lua with haproxy, but I couldn't figure out if I
can force a CONNECT via lua to the backend before haproxy starts
forwarding the request to backend.
Regards,
Vivek
On Sun, Jun 11, 2017 at 11:22 PM, Vivek Malik <[email protected]> wrote:
> Hi,
>
> I am using haproxy for path based routing and am trying to forward
> traffic to another datacenter under certain conditions. However, the
> traffic must go via explicit proxy server (squid). The traffic is
> getting forwarded to an https endpoint in AWS fronted by ELB.
>
> Is there a way to define "via proxy" in backend configuration? I did
> configuration search, mailing list archive search and google search
> but couldn't come up with anything.
>
> Or is there any software which can forward traffic via squid to
> another endpoint. (I checked stunnel but didn't find such feature)
>
> Thanks for guiding me with ideas or pointers.
>
> Regards,
> Vivek