Apache 2.4 set ProxyTimeout only for ONE URL
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 videos on Youtube
IsKor
Updated on September 18, 2022Comments
-
IsKor almost 2 years
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 theProxyTimeout
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
andProxyPass /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!
-
IsKor about 7 yearsYes, mod_proxy is on, with or without timeout value I can see that they are working well. In fact I seek to increase the timeout between Apache and the client, not the timeout between Apache and Tomcat.
-
8080HouseFul about 7 yearsCan you check if you have an entry In your httpd.conf (in server config or vhost config) TimeOut 600 (in seconds) . Also please read TimeOut Directive here : httpd.apache.org/docs/2.4/mod/core.html#timeout
-
IsKor about 7 yearsThanks for your answer! I don't have any TimeOut directive anywhere in my config files. I already read the doc for this directive but it's rather succinct and does not help me that much...