Apache 2.4 set ProxyTimeout only for ONE URL

ajpapache-2.4proxypasstimeout

I have an issue with Apache proxies.

I was asked to let the connection between Apache and the web client opened, because we are working on SSE.
The problem is that by default the timeout is 60secs. I would like to increase this value significantly, and I found the ProxyTimeout directive which is great BUT it increases the timeout for ALL proxies.
On my conf I have multiple ajp proxies, and I would have liked to apply the ProxyTimeout only to /test:

ProxyPass /test ajp://some_ip:8009/some_URL
ProxyPassReverse /test ajp://some_ip:8009/some_url

ProxyPass /test2 ajp://some_ip2:8009/some_url2
ProxyPassReverse /test2 ajp://some_ip2:8009/some_url2

Is there a way to do so?

So far I tested with:
ConnectionTimeout
and
ProxyPass /test ajp://some_ip:8009/some_URL timeout=120 to no avail.

I even tried to specify a timeout with a Proxy block:

<Proxy "ajp://some_ip:8009/some_url">
Proxyset timeout=10
</Proxy>

but again it failed.

I am not familiar with levels of timeout in Apache (I know there are some), and my knowledge of Apache is rather limited.

Thanks for you help!

Best Answer

It's currently not possible because directives inside <Proxy> are only read at server-start time rather than after each request.

Hope may come from https://bz.apache.org/bugzilla/show_bug.cgi?id=62422

After introducing a "Proxy" context, it should become possible to generically modify proxy settings (ProxySet) according to request being served (eg: its URL among other).

Related Topic