My Apache httpd proxy server has an upstream proxy that only accepts HTTP CONNECT method.
According to https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxyremote
When using https, the requests are forwarded through the remote proxy using the HTTP CONNECT method.
I added the following directive to httpd.conf:
ProxyRemote "*" "https://127.0.0.1:9051"
However, when a client sends a proxy GET request it's not converted to a CONNECT request, but is passed through unchanged.
Did I misunderstand the doc? How to make Apache convert the first proxy request to a site to a CONNECT request to the upstream proxy? Here's the desired conversation with HTTP keepalive:
browser Apache Upstream
>> GET http://site-a.com/page1
>> CONNECT site-a.com:80
>> GET /page1
>> GET http://site-b.com/page1
>> CONNECT site-b.com:80
>> GET /page1
>> GET http://site-a.com/page2
(reuse existing site-a connection)
>> GET /page2
>> GET http://site-b.com/page2
(reuse existing site-b connection)
>> GET /page2
0 Answers