我有什么和作品所有的ProxyPass映射:设置超时在Apache服务器的mod_proxy指令
我使用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
参数的所有映射?提前致谢。
题外话。尝试serverfault.com。 – EJP 2013-02-12 09:26:03
我同意你在ServerFault中的更好,但有Apache和mod_proxy相关标签,是不是?我的问题针对的是Apache 2.2 Server的mod_proxy指令设置。 – 2013-02-12 10:03:08
我知道,谢谢你。我管理,但我自己找到一个解决方案,我在这里添加它,也许有人认为它有用。 – 2013-02-12 12:20:52