Welcome! Log In Create A New Profile

Advanced

Re: MP4 + proxy_cache/proxy_store

Kruglov Eugenie
October 24, 2011 07:32AM
limit_zone one $binary_remote_addr 64k;
server {
listen 127.0.0.101:812;
server_name host_stream_store;

location ~ '^/store/(\d+_(\d+)_[\da-f]{32}\.flv)$' {
limit_conn one 1;
proxy_pass http://remote-backend/$1;
proxy_store /mnt/storage/streaming/$2.flv;
}
}

server {
server_name frontend;

location ~ '^/\d+_(\d+)_[\da-f]{32}\.flv$' {
set $args_start $args;
if ( -f /mnt/storage/streaming/$1.flv ){
rewrite ^ /stream$request_uri last;
}
rewrite ^ /stream_store$request_uri last;
}
location @stream {
proxy_pass http://remote-backend$request_uri;
proxy_set_header Host remote-backend;
}
location ~ '^/stream_store/(\d+_\d+_[\da-f]{32}\.flv)' {
internal;
proxy_pass http://127.0.0.101:812/store/$1;
proxy_intercept_errors on;
error_page 503 = @stream;
}
location ~ ^/stream/\d/\d/([^/]+\.flv)$ {
internal;
set $args $args_start;
alias /mnt/storage/streaming/$1;
mp4;
}
}

2011/10/24 Alexander Moskalenko <alexander.moskalenko@gmail.com>

> 2011/10/24 Kruglov Eugenie <ekruglov@gmail.com>
>
>> Если устроит реализация, при которой во время работы proxy_store одному
>> клиенту все остальные проксируются на бекенд - могу выложить конфиг.
>>
>> Выкладывайте, возможно хоть подтолкет в нужное направление.
>
> _______________________________________________
> nginx-ru mailing list
> nginx-ru@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru
>



--
Faithfully yours, Eugenie
ICQ #701217
GTalk ekruglov@gmail.com
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

MP4 + proxy_cache/proxy_store

Alexander Moskalenko October 24, 2011 05:00AM

Re: MP4 + proxy_cache/proxy_store

Igor Sysoev October 24, 2011 05:46AM

Re: MP4 + proxy_cache/proxy_store

Maxim Dounin October 24, 2011 05:54AM

Re: MP4 + proxy_cache/proxy_store

Alexander Moskalenko October 24, 2011 06:18AM

Re: MP4 + proxy_cache/proxy_store

Kruglov Eugenie October 24, 2011 05:58AM

Re: MP4 + proxy_cache/proxy_store

Alexander Moskalenko October 24, 2011 06:20AM

Re: MP4 + proxy_cache/proxy_store

Kruglov Eugenie October 24, 2011 07:32AM

Re: MP4 + proxy_cache/proxy_store

Alexander Moskalenko October 25, 2011 10:10AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 154
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