小编Rau*_*ene的帖子

为 Apache Server mod_proxy 指令中的所有 ProxyPass 映射设置超时

我所拥有的和工作的:

我使用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/

...
Run Code Online (Sandbox Code Playgroud)

这效果很好。

我想要的是:

我的一些请求花费了更长的时间,因此它们超时,给我一个代理错误 - 原因:从远程服务器读取错误

我想满足timeout我所有的要求。我可以做到这一点而不必timeout=... KeepAlive=On为每个ProxyPass映射添加吗?

我目前有类似的东西:

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
Run Code Online (Sandbox Code Playgroud)

我可以以某种方式告诉 Apache为所有映射添加参数吗timeout …

mod-proxy apache-2.2

4
推荐指数
1
解决办法
3万
查看次数

标签 统计

apache-2.2 ×1

mod-proxy ×1