Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
0bc47b73
Commit
0bc47b73
authored
Sep 20, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://git.varnish-cache.org/git/varnish-cache
parents
c94a8092
e1fea86a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
14 deletions
+15
-14
mgt_param.c
bin/varnishd/mgt_param.c
+2
-2
zope-plone.vcl
etc/zope-plone.vcl
+13
-12
No files found.
bin/varnishd/mgt_param.c
View file @
0bc47b73
...
...
@@ -525,7 +525,7 @@ static const struct parspec input_parspec[] = {
"Maximum length of any HTTP client request header we will "
"allow. The limit is inclusive its continuation lines.
\n
"
,
0
,
"
4096
"
,
"bytes"
},
"
8192
"
,
"bytes"
},
{
"http_req_size"
,
tweak_uint
,
&
master
.
http_req_size
,
256
,
UINT_MAX
,
"Maximum number of bytes of HTTP client request we will deal "
...
...
@@ -541,7 +541,7 @@ static const struct parspec input_parspec[] = {
"Maximum length of any HTTP backend response header we will "
"allow. The limit is inclusive its continuation lines.
\n
"
,
0
,
"
4096
"
,
"bytes"
},
"
8192
"
,
"bytes"
},
{
"http_resp_size"
,
tweak_uint
,
&
master
.
http_resp_size
,
256
,
UINT_MAX
,
"Maximum number of bytes of HTTP backend resonse we will deal "
...
...
etc/zope-plone.vcl
View file @
0bc47b73
...
...
@@ -14,8 +14,8 @@
# Default backend is the Zope CMS
backend default {
set backend
.host = "127.0.0.1";
set backend
.port = "9673";
.host = "127.0.0.1";
.port = "9673";
}
acl purge {
...
...
@@ -29,10 +29,10 @@ sub vcl_recv {
# requests for unknown hosts
if (req.http.host ~ "(www.)?example.com") {
set req.http.host = "example.com";
set req.url = "/VirtualHostBase/http/example.com:80/example.com/VirtualHostRoot" req.url;
set req.url = "/VirtualHostBase/http/example.com:80/example.com/VirtualHostRoot"
+
req.url;
} elsif (req.http.host ~ "(www.)?example.org") {
set req.http.host = "example.org";
set req.url = "/VirtualHostBase/http/example.org:80/example.org/VirtualHostRoot" req.url;
set req.url = "/VirtualHostBase/http/example.org:80/example.org/VirtualHostRoot"
+
req.url;
} else {
error 404 "Unknown virtual host.";
}
...
...
@@ -42,7 +42,7 @@ sub vcl_recv {
# POST - Logins and edits
if (req.request == "POST") {
pass
;
return(pass)
;
}
# PURGE - The CacheFu product can invalidate updated URLs
...
...
@@ -50,7 +50,7 @@ sub vcl_recv {
if (!client.ip ~ purge) {
error 405 "Not allowed.";
}
lookup
;
return(lookup)
;
}
}
...
...
@@ -60,9 +60,9 @@ sub vcl_recv {
# Force lookup of specific urls unlikely to need protection
if (req.url ~ "\.(js|css)") {
remove req.http.cookie;
lookup
;
return(lookup)
;
}
pass
;
return(pass)
;
}
# The default vcl_recv is used from here.
...
...
@@ -71,13 +71,14 @@ sub vcl_recv {
# Do the PURGE thing
sub vcl_hit {
if (req.request == "PURGE") {
set obj.ttl = 0s
;
purge
;
error 200 "Purged";
}
}
sub vcl_miss {
if (req.request == "PURGE") {
error 404 "Not in cache";
purge;
error 200 "Purged";
}
}
...
...
@@ -85,7 +86,7 @@ sub vcl_miss {
# from Zope by using the CacheFu product
sub vcl_fetch {
if (
obj
.ttl < 3600s) {
set
obj
.ttl = 3600s;
if (
beresp
.ttl < 3600s) {
set
beresp
.ttl = 3600s;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment