There is no way of controlling timeout when proxying by means of ReWriteRule (mod_rewrite) with Apache 2.4.
<VirtualHost "*:443">
  ServerName xxxx
  Use ssl
  RewriteEngine On
  RewriteRule (.*/wms|/openlayers3/.*) http://localhost:8080$1 [P,L]
  RewriteRule .* [F]
</VirtualHost>
I've tried unsuccessfully:
Timeout 400ProxyTimeout 400<Proxy "http://localhost:8080/">
  ProxySet connectiontimeout=100 timeout=400
</Proxy>
ProxyPass "/" "http://localhost:8080" connectiontimeout=100 timeout=400The timeout is always 1 minute, no matter which of the above directives I use.
This timeout can be controlled only globally. Change the global Timeout setting in httpd.conf to your preferred value:
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 400
Probably a better way to do this would be to use nginx:
server {
    listen       443;
    server_name  xxxx;
    # ... ssl setup ...
    location ~* /wms$ {
        proxy_pass http://localhost:8080;
        proxy_read_timeout 400;
    }
    location /openlayers3/ {
        proxy_pass http://localhost:8080;
        proxy_read_timeout 400;
    }
    location / {
        return 403;
    }
}
Additional links to nginx documentation so that you understand what's going on in this snippet:
location and how regular expressions work in nginxproxy_passproxy_read_timeoutFor the SSL configuration missing in my snippet please also read the documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With