[Varnish] #294: Missing variables
Varnish
varnish-bugs at projects.linpro.no
Fri Aug 22 16:23:41 CEST 2008
#294: Missing variables
--------------------+-------------------------------------------------------
Reporter: ay | Owner: des
Type: defect | Status: new
Priority: normal | Milestone:
Component: build | Version: trunk
Severity: normal | Keywords:
--------------------+-------------------------------------------------------
I was hoping to do two things
(from man-page)
The following variables are always available:
now The current time, in seconds since the epoch.
The following variables are available in backend declarations:
backend.host
Host name or IP address of a backend.
I was hoping to do two things:
1) Set ip of backend in headers
remove obj.http.X-VG-Varnish-IP;
set obj.http.X-VG-Varnish-IP = server.ip;
remove obj.http.X-VG-Backend-IP;
set obj.http.X-VG-Vackend-IP = backend.host;
And in vcl_error
<h3>Error "} obj.status " " obj.response {"</h3>
<ul>
<li>Time: "} now {" <li>
<li>URL: "} req.request " " req.url {"</li>
<li>Client: "} client.ip {"</li>
<li>Cache: "} server.ip {"</li>
<li>Backend: " } backend.host {"<li>
</ul>
But I get
Expected ';' got 'now'
(program line 502), at
(/etc/varnish/vg.vcl Line 168 Pos 22)
<li>Time: "} now {" <li>
---------------------###--------
And
Unknown variable 'backend.host'
At: (/etc/varnish/vg.vcl Line 171 Pos 25)
<li>Backned: "} backend.host {"</li>
Changing backend.host to req.backend mentioned a few other places gives
med
[root at maddie ~]# varnishd -f /etc/varnish/vg.vcl
String representation of 'req.backend' not implemented yet.
(/etc/varnish/vg.vcl Line 171 Pos 25)
<li>Backned: "} req.backend {"</li>
Any chance of getting a string version of req.backend? And maybe updating
the man page?
--
Ticket URL: <http://varnish.projects.linpro.no/ticket/294>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list