Use shipped vcl example file, rather than our own
OBS-URL: https://build.opensuse.org/package/show/server:http/varnish?expand=0&rev=70
This commit is contained in:
parent
4fe9ebeb78
commit
749ca9df99
@ -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*
|
||||
|
30
vcl.conf
30
vcl.conf
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user