Dear Nitesh,
It looks like the header is ok, since ESI processing started. I also had problems with parser 'libxml2' - it was constantly reporting some parsing errors even on simple pages which were validated with W3C validator.
So finally I changed to 'custom' and 'expat' parsers.
I suggest you first try some really simple ESI constructs with 'custom' parser.
Regards, Michal
Nitesh Naik napisaÅ(a):
Dear Michal,
Thanks for your reply.
Let me send you some more information about settings that I am using.
We are using squid squid-3.0-PRE3-20041220 for parsing ESI. squid is compiled with esi ( --enable-esi ) but for some reason esi is not getting parsed and we get following error in the browser.
The following error was encountered:
ESI Processing failed. The ESI processor returned: esiProcess: Parse error at line 2: junk after document element This means that: The surrogate was not able to process the ESI template. Please report this error to the webmaster
ESI example used <esi:assign name="date_string" value="$strftime($time(), '%a, %d %B %Y %H:%M:%S %Z')"/> <esi:vars> $(date_string) </esi:vars>
squid.conf settings
httpd_accel_surrogate_id unset-id http_accel_surrogate_remote on esi_parser libxml2 cache_peer xyz.com parent 80 0 no-query originserver
Apache configuration at origin server <Directory /esi/> Header add Surrogate-Control max-age=60,content="ESI/1.0" ExpiresActive On ExpiresByType text/html "now plus 1 minutes" </Directory>
When we hit origin server the Surrogate-Control is added to header
HTTP/1.1 200 OK Date: Fri, 04 Mar 2005 13:30:03 GMT Surrogate-Control: max-age=60,content="ESI/1.0" P3P: CP="NOI DSP COR CURa ADMa DEVa PSDa OUR BUS UNI COM NAV OTC", policyref="/w3c/p3p.xml" Last-Modified: Fri, 04 Mar 2005 12:50:06 GMT ETag: "13c8a1-133-4228597e" Accept-Ranges: bytes Content-Length: 307 Connection: close Content-Type: text/html
Regards Nitesh Naik
----- Original Message ----- From: "Michal Pietrusinski" <michal.pietrusinski@xxxxxxx>
To: <squid-users@xxxxxxxxxxxxxxx>
Sent: Tuesday, March 08, 2005 5:26 PM
Subject: Re: [squid-users] Did Anyone used ESI with squid ?
Dear Nitesh,
I'm also trying to use ESI with squid - I installed Squid 3, (remember to use --enable-esi with configure) and pages are composed fine (I use <esi:include>), but templates and fragments are not cached.
Remember that your pages must have appropriate HTTP headers in order to make squid parsing it as ESI templates.
I hope you are more lucky and will have your pages cached.
Regards, Michal Pietrusinski
Nitesh Naik napisaÅ(a):
Hi,
I am having problem with configuring squid with ESI parsing. Did anyone implemented it ?
Regards Nitesh Naik