我拥有并且正常运作:
我正在使用 Apache HTTPD 2.2 进行代理请求。我有多个 ProxyPass 映射:
ProxyRequests On
<Proxy *>
AddDefaultCharset off
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost Off
ProxyPass /a http://some_ip/
ProxyPassReverse /a http://some_ip/
ProxyPass /b http://some_other_ip/
ProxyPassReverse /b http://some_other_ip/
...
这个很有效。
我想要的是:
我的某些请求需要更长时间才能完成,因此它们超时了并给出了代理错误 - 原因:从远程服务器读取错误。
我想为所有请求设置timeout
。是否可以在不必为每个ProxyPass
映射添加timeout=... KeepAlive=On
的情况下完成?
我目前拥有类似以下内容的东西:
ProxyPass /a http://some_ip/ timeout=1200 KeepAlive=On
ProxyPassReverse /a http://some_ip/
ProxyPass /b http://some_other_ip/ timeout=1200 KeepAlive=On
ProxyPassReverse /b http://some_other_ip/
... and i do this for all my ProxyPass mappings
我能否通过某种方式告诉Apache为所有映射添加timeout
和KeepAlive
参数?提前致谢。