Welcome! Log In Create A New Profile

Advanced

Re: mod zip - пример конфига для собирания файлов с разных серверов

Dmitry Dedukhin
October 16, 2012 01:48AM
15.10.2012 17:21, gatesat пишет:
> Приветствую уважаемые !
>
> Подскажите пожалуйста правильный конфиг nginx для mod_zip-а для собирания
> файлов с разных удаленных серверов.
> Созерцание лаконичного примера из документации http://wiki.nginx.org/NgxZip
>
> Remote Upstreams
>
> You can use the following setup to compose archives from multiple remote
> servers:
>
> 1034ab38 428 /server1/foo.txt My Document1.txt
> 83e8110b 100339 /server2/bar.txt My Other Document1.txt
>
> location ~
> "^/(?<srv>server[12])/(?UNIQ25789bf7448563f7-file-00000000-QINU
>
> не навело меня на правильную мысль.
>
> Заранее благодарен.
>

Мы используем примерно так.
На фронтенде:

location ~* /d/(.+?):(.+?)/(.+) { # proxied download from storage
internal;
proxy_hide_header Content-Type; # correct Content-Type is set by
backend
proxy_pass http://$1:$2/$3;
}

Бэкенд возвращает mod_zip'у на фронтенде Content-Type файла (у нас файлы
хранятся без расширений) и список вида:

/d/127.0.0.1:8001/path/to/file1
/d/127.0.0.1:8002/path/to/file2
/d/127.0.0.1:8003/path/to/file3

_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

Re: mod zip - пример конфига для собирания файлов с разных серверов

Dmitry Dedukhin October 16, 2012 01:48AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 261
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready