Created
January 17, 2012 20:43
-
-
Save marcw/1628757 to your computer and use it in GitHub Desktop.
Varnish vcl file in order for varnish to participate to the sopa blackout
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
# use with: | |
# | |
# varnishadm -T host:port -S /etc/varnish/secret "vcl.load sopa /path/to/your/sopa.vcl" | |
# varnishadm -T host:port -S /etc/varnish/secret "vcl.use sopa" | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "8080"; | |
} | |
sub vcl_recv { | |
error 503; | |
} | |
sub vcl_error { | |
set obj.http.Content-Type = "text/html; charset=utf-8"; | |
synthetic {" | |
<html> | |
<head> | |
<title>Down during the SOPA Blackout</title> | |
</head> | |
<body> | |
<h1>Down during the SOPA Blackout.</h1> | |
</body> | |
</html> | |
"}; | |
return (deliver); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment