Last active
August 29, 2015 14:02
-
-
Save Souvent22/ca9ad74b3ae2ae35726e to your computer and use it in GitHub Desktop.
Snipppets for DrupalCon Austin
This file contains 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
## APACHE BENCH COMMANDS | |
ab -c 25 -n 100 http://localhost/heavy | |
ab -c 25 -n 100 http://localhost | |
# This are snippets for DrupalCon. | |
# Bitly link: http://bit.ly/DDAustin | |
# Files: http://www.earnestberry.com/austintalk.zip | |
# <esi:include src="/robots.txt" /> | |
# White list items | |
# FIlter out cookies. | |
#set req.http.Cookie = regsuball(req.http.Cookie, ";(Drupal\.visitor\.color)=", "; \1="); | |
#set req.http.Cookie = regsuball(req.http.Cookie, ";(color)=", "; \1="); | |
# include "/includes/mobile_detect.vcl" | |
# call mobile_detect | |
# Hash function | |
sub vcl_hash { | |
if (req.http.Cookie) { | |
hash_data(req.http.Cookie); | |
} | |
if (req.http.X-Device) { | |
hash_data(req.http.X-Device); | |
} | |
} | |
# Use this to monitor the varnish log for certain requests, in this case /austintalk | |
varnishlog -c -m 'RxURL:^/austintalk/.*' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment