Akamai provides their own version of an ESI testing server found here:
http://www.akamai.com/html/support/esi.html
Of course it’s not open source, it’s a pre-compiled binary and “Caching of template and fragments is not supported”. Who would shoot themselves in the foot by providing a free version of their commercial offering? Ok yes, Red Hat does but moving on…
I grabbed the FC7 version for CentOS 5.5, extracted, ran the install script with an ETS listening on port 80 and origin host at localhost and port 81. Turn on ESI Debugging too, it’s rather informative being able to view the source with ESI tags and the actions of the server on those tags. To see the debug info view the page source of a request since they’re hidden.
Edit the standard Apache install at /etc/httpd/conf/httpd.conf and change it to listen on port 81.
After setting up Symfony 2′s native ESI handling demo as detailed here:
http://symfony.com/doc/current/book/http_cache.html#edge-side-includes
Akamai’s config will need a couple headers in order for Symfony to respond with ESI tags in the response.
Edit the Akamai config here: /usr/local/ETS/conf/httpd.conf
Edit the VirtualHost directive near the end of the file and add these two directives:
Accept-Esi 1.0
Now Symfony 2 will see that an ESI Surrogate is making a request and it will respond with the ESI tag instead of filling it in. Develop your app using port 81 and test your ESI through port 80. View the page source to see the debugging info if debugging is enabled.
This guide is similar to the cookbook entry for Varnish which also requires that the surrogate header be set:
nice post!
i cant share this link : https://rob.olmos.name/2011/02/symfony2-varnish-like-esi-with-akamai-ets-mod_esi-edge-side-include
am i doing it wrong ?