-
-
Save bool-dev/031cfd05e3defa19466e50df6be8207a to your computer and use it in GitHub Desktop.
Revisions
-
jmervine revised this gist
Feb 11, 2014 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -14,6 +14,9 @@ # # See below for urls.txt example. # # Matches should be in /tmp/match.log with a 200 status. # # Everything else should be in /tmp/access.log with a 404 status. worker_processes 1; http { -
jmervine renamed this gist
Feb 11, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
jmervine created this gist
Feb 11, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ http://localhost:8888/good1 http://localhost:8888/good2 http://localhost:8888/good3 http://localhost:8888/bad1 http://localhost:8888/bad2 http://localhost:8888/bad3 http://localhost:8888/good4 http://localhost:8888/bad4 http://localhost:8888/good5 http://localhost:8888/bad5 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,40 @@ # Usage: # # Start with: # # sudo /use/local/sbin/nginx -c /path/to/this/nginx.conf # # Tail logs: # # $ sudo tail -f /tmp/access.log /tmp/error.log /tmp/match.log # # Generate load: # # $ cat ./urls.txt | xargs curl -i # # See below for urls.txt example. # worker_processes 1; http { include /usr/local/etc/nginx/mime.types; default_type application/octet-stream; log_format main '$status $request'; # e.g. "200 GET /foo HTTP/1.1" access_log /tmp/access.log main; error_log /tmp/error.log; server { listen 8888; server_name localhost; location ~ ^/good[0-9]$ { # << regex here access_log /tmp/match.log main; return 200; } location / { return 404; } } }