httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Gausling <>
Subject [users@httpd] Apache as HTTP Proxy: GZIP compression handling configuration question
Date Wed, 26 Apr 2017 10:21:58 GMT

I am using Apache (2.4.10) as an HTTP Proxy with two virtual hosts
on different ports:
- Forward Proxy
- Reverse Proxy

Depending on the use case applications either use the Forward Proxy or the
Reverse Proxy.

Now I want to make sure that for both virtual hosts the proxy does handles
content compression (using gzip). Basically there are two use cases that
need to be configured:
- Use Case 1 - Request compressed content and decompress received content
- Use Case 2 - Compress outgoing traffic (HTTP POST)

This is to ensure that applications using any of the two HTTP Proxies do not
need to handle content inflation/deflation (besides other things the
proxies are configured to do).
The applications are basically simple libcurl programms that shall be kept
simple as possible, which is the reason of this exercise.

Use Case 1 works fine when I add the "Accept-Encoding: gzip" header to each
outgoing request and when I inflate received content. This is achieved by
adding the following to the Virtual Host section of each proxy:

<IfModule mod_deflate.c>
    RequestHeader set Accept-Encoding gzip
    SetOutputFilter INFLATE

My problem is that I am not able to configure the Virtual Hosts so that each
HTTP POST request from an application (with uncompressed body) gets deflated
in the HTTP Proxy before being sent to the Web Server.

So my questions are:
- Is this supported by mod_deflate anyway?
- How would I need to configure mod_deflate for this?
- Do I need to handle the Forward and the Reverse Proxy separately or is
 configuration the same?


View raw message