Mark Bergsma has uploaded a new change for review.
https://gerrit.wikimedia.org/r/65253
Change subject: Add Text Varnish VCL include boilerplate
......................................................................
Add Text Varnish VCL include boilerplate
Change-Id: I30e01bef55a63f1657ae4236d1e75a2f8ea74c96
---
A templates/varnish/text-backend.inc.vcl.erb
A templates/varnish/text-frontend.inc.vcl.erb
2 files changed, 23 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/53/65253/1
diff --git a/templates/varnish/text-backend.inc.vcl.erb
b/templates/varnish/text-backend.inc.vcl.erb
new file mode 100644
index 0000000..49b3c07
--- /dev/null
+++ b/templates/varnish/text-backend.inc.vcl.erb
@@ -0,0 +1,13 @@
+# Varnish VCL include file for text backends
+
+sub vcl_recv {
+ call vcl_recv_purge;
+
+ if ( req.http.host ~ "^test\." ) {
+ set req.backend = test_wikipedia;
+ return (pass);
+ }
+ if (req.url ~ "^/w/api.php") {
+ set req.backend = api;
+ }
+}
diff --git a/templates/varnish/text-frontend.inc.vcl.erb
b/templates/varnish/text-frontend.inc.vcl.erb
new file mode 100644
index 0000000..dae4abb
--- /dev/null
+++ b/templates/varnish/text-frontend.inc.vcl.erb
@@ -0,0 +1,10 @@
+# Varnish VCL include file for text frontends
+
+sub vcl_recv {
+ /* Allow purging */
+ call vcl_recv_purge;
+
+ /* make absolute URIs relative as to not have to rewrite them too;
+ * do this after vcl_recv_purge, as it operates on a full URI */
+ call rewrite_proxy_urls;
+}
\ No newline at end of file
--
To view, visit https://gerrit.wikimedia.org/r/65253
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I30e01bef55a63f1657ae4236d1e75a2f8ea74c96
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits