私が持っているものと動作するもの:
プロキシリクエストに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/
...
これはうまく機能します。
私が欲しいもの:
一部のリクエストに時間がかかっているため、タイムアウトしてProxy Error-Reason:Error reading from remote server 。
すべてのリクエストに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
すべてのマッピングにtimeout
およびKeepAlive
パラメータを追加するように何らかの方法でApacheに指示できますか?前もって感謝します。
私は自分で解決策を見つけることができました。 mod_proxy
のProxyTimeout
ディレクティブを直接使用して、タイムアウトを設定できます。
ProxyRequests On
<Proxy *>
AddDefaultCharset off
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost Off
ProxyTimeout 1200