From 749ca9df991224100c524a066d5f3f9c071e8cd62fe19e4f6beb3bffacbc5299 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 27 Mar 2015 20:36:01 +0000 Subject: [PATCH] Use shipped vcl example file, rather than our own OBS-URL: https://build.opensuse.org/package/show/server:http/varnish?expand=0&rev=70 --- varnish.spec | 8 ++------ vcl.conf | 30 ------------------------------ 2 files changed, 2 insertions(+), 36 deletions(-) delete mode 100644 vcl.conf diff --git a/varnish.spec b/varnish.spec index 19f886a..d083459 100644 --- a/varnish.spec +++ b/varnish.spec @@ -28,11 +28,8 @@ Url: http://varnish-cache.org/ #Git-Clone: git://git.varnish-cache.org/varnish-cache #Git-Web: https://varnish-cache.org/trac/browser Source: https://repo.varnish-cache.org/source/%name-%version.tar.gz -Source2: varnish.init Source3: varnish.sysconfig -Source4: vcl.conf Source5: varnish.logrotate -Source6: varnishlog.init Source7: varnish.service Source8: varnishlog.service Patch1: 0001-Fail-fetch-on-malformed-Content-Length-header.patch @@ -128,8 +125,8 @@ ln -s service "$b/%_sbindir/rcvarnish"; ln -s service "$b/%_sbindir/rcvarnishlog"; # ##config files -install -Dpm 0644 %{S:4} "$b/%_sysconfdir/%name/vcl.conf"; -install -Dpm 0644 %{S:4} "$b/%_sysconfdir/%name/vcl.conf.example"; +mkdir -p "$b/%_sysconfdir/%name" +cp "$b/%_docdir/%name/example.vcl" "$b/%_sysconfdir/%name/vcl.conf" find "$b" -type f -name "*.la" -delete mkdir -p "$b/%pkg_logdir" @@ -166,7 +163,6 @@ cp -a ChangeLog LICENSE README "$b/%_docdir/%name/" %config(noreplace) %_sysconfdir/logrotate.d/varnish %dir %attr(0750,root,varnish) %_sysconfdir/%name/ %config(noreplace) %attr(0640,root,varnish) %_sysconfdir/%name/vcl.conf -%config %attr(0640,root,varnish) %_sysconfdir/%name/vcl.conf.example %_libdir/varnish %_sbindir/varnish* %_sbindir/rcvarnish* diff --git a/vcl.conf b/vcl.conf deleted file mode 100644 index a4e9dcd..0000000 --- a/vcl.conf +++ /dev/null @@ -1,30 +0,0 @@ -# -# This is a basic VCL configuration file for varnish. See the vcl(7) -# man page for details on VCL syntax and semantics. -# -# $Id: vcl.conf 1200 2006-10-19 09:21:42Z des $ -# - -backend default { - .host = "127.0.0.1"; - .port = "8080"; -} - -sub vcl_recv { - # pass mode can't handle POST (yet) - if (req.request == "POST") { - return(pipe); - } - - # don't bother caching large files - if(req.url ~ "\.(pdf|mp3|flv|mov|mp4|mpg|mpeg|avi|dmg)") { - return(pipe); - } - - # force lookup even when cookies are present - if (req.request == "GET" && req.http.cookie) { - return(lookup); - } - - -}