Created
May 9, 2014 19:27
-
-
Save stevenmc/bd877303606926a9c8c6 to your computer and use it in GitHub Desktop.
How to limit/throttle site speeds to test performance on Nginx servers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location / { | |
if ( $remote_addr ~* 192.133.125.0/24 ) { | |
limit_rate 3k; | |
} | |
if ( $remote_addr ~* 165.135.0.0/16 ) { | |
limit_rate 3k; | |
} | |
if ( $remote_addr ~* 192.104.54.0/24 ) { | |
limit_rate 3k; | |
} | |
if ( $remote_addr ~* 4.21.126.0/24 ) { | |
limit_rate 3k; | |
} | |
if ( $remote_addr ~* 65.125.25.64/26 ) { | |
limit_rate 3k; | |
} | |
if ( $remote_addr ~* 208.23.64.0/25 ) { | |
limit_rate 3k; | |
} | |
# put the serve files or proxy_pass code here. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment