V
V
Vitali2012-06-21 15:04:50
Nginx
Vitali, 2012-06-21 15:04:50

Proxying GET parameters through a static image using NGINX?

There is the following task:
There is a picture, it should be given by Nginx as static. But it can be called with different GET parameters and these parameters must be proxied to another server.
Is it possible and how to implement it?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
V
VBart, 2012-06-21
@Screatch

Use X-Accel-Redirect.

A
Andrey Burov, 2012-06-21
@BuriK666

location can use regular expressions, you can parse everything and substitute it where you need it

E
Evgeny Yablokov, 2012-06-21
@Gular

You need to do almost the same thing. Subscribed for replies.

A
Alexey Akulovich, 2012-06-21
@AterCattus

Can you be more specific about what and how? It is not entirely clear with the proxying of parameters to another server for statics.

S
slang, 2012-06-23
@slang

You can use the eval or echo modules to send a background subrequest while serving up a picture. But I'd rather parse a custom pixel.access.log than fence such a garden with a backend and modules.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question