Question about a config file
Rainer Duffner
rainer at ultra-secure.de
Sat Aug 6 17:40:00 CEST 2011
Am Sat, 6 Aug 2011 17:02:32 +0200
schrieb Rainer Duffner <rainer at ultra-secure.de>:
Sorry, my keyboard is acting up (need a new laptop...)
Anyway, there is a module for typo3 and varnish called "moc_varnish".
It comes with a number of config-files for varnish and I'm trying those.
But when I run varnishd with one of those, I just get errors:
/usr/local/sbin/varnishd
-f /home/customer/htdocs/typo3conf/ext/moc_varnish/vcl-examples/production.vcl
-a :80
Message from VCC-compiler:
Expected ';' got '('
(program line 174), at
('input' Line 23 Pos 22)
purge("req.url ~ " req.url " && req.http.host == "
req.http.host);
---------------------#------------------------------------------------------------
Running VCC-compiler failed, exit 1
VCL compilation failed
The config upto that point looks pretty straight-forward:
#Backend definitions
#
backend default {
.host = "127.0.0.1";
.port = "8080";
}
acl purge {
"127.0.0.1";
}
sub vcl_recv {
if (req.request == "PURGE") {
if (!client.ip ~ purge) {
error 405 "Not allowed.";
}
purge("req.url ~ " req.url " && req.http.host == "
req.http.host);
error 200 "Purged.";
}
if(req.backend.healthy) {
set req.grace = 0s;
} else {
set req.grace = 24h;
}
if (req.request != "GET" &&
req.request != "HEAD" &&
req.request != "PUT" &&
req.request != "POST" &&
req.request != "TRACE" &&
req.request != "OPTIONS" &&
req.request != "DELETE") {
/* Non-RFC2616 or CONNECT which is weird. */
return (pipe);
}
if (req.request != "GET" && req.request != "HEAD") {
/* We only deal with GET and HEAD by default */
return (pass);
}
...
etc.
(Full file is here
http://typo3.org/extensions/repository/view/moc_varnish/1.1.0/info/?tx_terfe_pi1%5BdownloadFile%5D=vcl-examples%252Fproduction.vcl&cHash=d810eb4b10
)
This is confusing, as the same example is given in the wiki.
I'm running 3.0.0 on FreeBSD 8.2 amd64.
I compiled it myself (via ./configure etc) and also edited the port so that it fetches and compiles 3.0.0.
What's wrong here?
More information about the varnish-misc
mailing list