ðòïåëôù 


  áòèé÷ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  óôáôøé 


  ðåòóïîáìøîïå 


  ðòïçòáííù 



ðéûéôå
ðéóøíá












     áòèé÷ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MP4 + proxy_cache/proxy_store



ššš 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@xxxxxxxxx>
2011/10/24 Kruglov Eugenie <ekruglov@xxxxxxxxx>
åÓÌÉ ÕÓÔÒÏÉÔ ÒÅÁÌÉÚÁÃÉÑ, ÐÒÉ ËÏÔÏÒÏÊ ×Ï ×ÒÅÍÑ ÒÁÂÏÔÙ proxy_store ÏÄÎÏÍÕ ËÌÉÅÎÔÕ ×ÓÅ ÏÓÔÁÌØÎÙÅ ÐÒÏËÓÉÒÕÀÔÓÑ ÎÁ ÂÅËÅÎÄ - ÍÏÇÕ ×ÙÌÏÖÉÔØ ËÏÎÆÉÇ.

÷ÙËÌÁÄÙ×ÁÊÔÅ, ×ÏÚÍÏÖÎÏ ÈÏÔØ ÐÏÄÔÏÌËÅÔ × ÎÕÖÎÏÅ ÎÁÐÒÁ×ÌÅÎÉÅ.

_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru



--
Faithfully yours, Eugenie
ICQ #701217
GTalk ekruglov@xxxxxxxxx
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.