ПРОЕКТЫ 


  АРХИВ 


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]

$body_bytes_sent


  • To: nginx-ru@xxxxxxxxx
  • Subject: $body_bytes_sent
  • From: "Alex Kamedov" <kamedov@xxxxxxxxx>
  • Date: Wed, 4 Jul 2007 17:55:36 +0600
  • Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=tC5BrqjbIQuzpKmBvlwvhUC42Fdqnkj2uGtP6PDTV2UOjQs4eGqUg9Dkn7DE1O0gykRAzP33Y50Quaty5QWPm7xdP0l9AOT6YqHGHZdEs21sXaYdCw2wH8TrVA9Xs2B5nioc3aWEHEHFCvKOPazEGcfFFDgsPLEsKsQIBY7FK8k=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=Y3K9QTR2uUVKZLEbi4LAy75P94bMGEHRQrdvpMI0FB9VSZHrSu11PCvAXrL1BZsVfD+o3il6L5V04CB3Zg/M4aoCzCPoCrQSP4WbQh3xW4DjxR/D+3kWqwbe6JkPWiCw0r6tCSyik5OzeuBXODouV0mPTF7yj59+ayVf26hDZLc=

Здравствуйте.
 
Пытаюсь реализовать контролируемое скачивание следующим образом
 
location ~* ^/media/.+\.(mp3|wma|ogg|ape|flac)$ {
    set $orig_uri $uri;
    set $orig_args $args;
    set $orig_ip $remote_addr;
    set $orig_query $query_string;
    set $orig_xforw $http_x_forwarded_for;
    post_action /counter.php?bs=$body_bytes_sent;
}


 location = /counter.php {
     internal;
    
     fastcgi_param SCRIPT_FILENAME/srv/www/mp3/public_html$fastcgi_script_name;
     fastcgi_param QUERY_STRING $query_string;
     fastcgi_param REQUEST_METHOD $request_method;
     fastcgi_param CONTENT_TYPE $content_type;
     fastcgi_param CONTENT_LENGTH $content_length;
     fastcgi_param HTTP_RANGE $http_range;
     fastcgi_param REMOTE_ADDR $remote_addr;
     fastcgi_param URI  $request_uri;
     fastcgi_param BYTES_SENT $body_bytes_sent;

#     include /usr/local/nginx/conf/fastcgi.conf;

            fastcgi_pass   127.0.0.1:8888;
            fastcgi_index  index.php;
 }



 




Copyright © Lexa Software, 1996-2009.