Skip to content

Instantly share code, notes, and snippets.

@ksamuel
Created July 18, 2011 11:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ksamuel/1089276 to your computer and use it in GitHub Desktop.
Save ksamuel/1089276 to your computer and use it in GitHub Desktop.
#
# A virtual host using mix of IP-, name-, and port-based configuration
#
server {
listen 80;
server_name str1.domain.com
# Limit bandwidth for web videos
location ~ web\.(3gp|mp4|flv)$ {
limit_rate_after 500k;
limit_rate 70k;
mp4;
root /data/domain.com;
}
#limit bandwidth for mobile videos
location ~ mobi\.(3gp|mp4|flv)$ {
limit_rate_after 200k;
limit_rate 30k;
mp4;
root /data/domain.com;
}
#serve images
location ~ \.(jpg|jpeg|gif|png)$ {
root /data/domain.com;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment