Skip to content

Instantly share code, notes, and snippets.

@kapkaev
Created May 5, 2012 14:29
Show Gist options
  • Select an option

  • Save kapkaev/2602880 to your computer and use it in GitHub Desktop.

Select an option

Save kapkaev/2602880 to your computer and use it in GitHub Desktop.
secure nginx video streaming
# Actual Streaming
location ~ /streaming/(.*\.mp4)$ {
# Fix strange CPU usage caused by gzip
gzip off;
gzip_static off;
limit_rate_after 10m;
limit_rate 400k;
alias /streaming/$1;
internal;
mp4;
}
location ~ /streaming/(.*\.flv)$ {
# Fix strange CPU usage caused by gzip
gzip off;
gzip_static off;
limit_rate_after 10m;
limit_rate 400k;
alias /streaming/$1;
internal;
flv;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment