Answer the question
In order to leave comments, you need to log in
Two nginx proxies + gzip between them
I have the following infrastructure: several backends, nginx in front of them. This nginx compresses the html it receives from the backends.
Next, there is another nginx that clients access. It should act as the dumbest proxy, simply forwarding the request to the first nginx server and passing the response to the clients.
However, at this stage, html compression falls off, both between the two nginx and uncompressed html is transmitted to clients. Compression for clients can be done on the nginx that the clients are accessing, but other than that, it's important to minimize traffic between the two nginx. In short, it should be like this:
[backends] -- html --> [nginx1+gzip] -- gzipped html --> [nginx2 (no gzip)] -- gzipped html --> [clients]
However, in the place highlighted in bold, it was not possible to make gzip, only uncompressed traffic runs.
Perhaps someone managed to set up such a configuration, how did you get out of the situation?
I found similar configurations where there were no problems, but apache was used instead of the first nginx. Therefore, I sin on the gzip module for nginx.
I don’t give configs, I have already tried many options and now there is a mess, I started with the standard ones taken from nginx.org/ru/docs/
Answer the question
In order to leave comments, you need to log in
nginx.org/r/gzip_http_version/ru if your nginx goes to upstream nginx via HTTP/1.0, and you left the value of this directive by default, then it is quite obvious that compression will not work.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question