Hi,
I can't seem to get esi working with Varnish.
I have a simple piece of html:
And /date.cgi is:
My relevant varnish vcl:
If I GET this /index.html, then I see only this in my browser:
If I GET /date.cgi, it outputs the date as expected.
If I view de source of /index.html in my browser, I see this:
Varnish Version: varnish-3.0.3_2
Any clues anyone? How do you debug this? I see nothing regarding 'esi' with varnishlog..
I can't seem to get esi working with Varnish.
I have a simple piece of html:
Code:
<HTML>
<BODY>
The time is: <esi:include src="/date.cgi" />
at this very moment.
</BODY>
</HTML>
And /date.cgi is:
Code:
#!/bin/sh
echo 'Content-type: text/html'
echo ''
date "+%Y-%m-%d %H:%M"
My relevant varnish vcl:
Code:
sub vcl_fetch {
if (req.url == "/test.html") {
set beresp.do_esi = true; /* Do ESI processing */
set beresp.ttl = 24 h; /* Sets the TTL on the HTML above */
} elseif (req.url == "/date.cgi") {
set beresp.ttl = 1m; /* Sets a one minute TTL on */
/* the included object */
}
}
If I GET this /index.html, then I see only this in my browser:
Code:
The time is: at this very moment.
If I GET /date.cgi, it outputs the date as expected.
If I view de source of /index.html in my browser, I see this:
Code:
<HTML>
<BODY>
The time is: <esi:include src="/date.cgi" />
at this very moment.
</BODY>
</HTML>
Varnish Version: varnish-3.0.3_2
Any clues anyone? How do you debug this? I see nothing regarding 'esi' with varnishlog..