Search squid archive

Re: [squid-users] Did Anyone used ESI with squid ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michal,

Here is ESI code that I used .

<table>
<tr>
<td colspan="2">
<esi:try>
<esi:attempt>
<esi:include src="http://www.yahoo.com"/>
</esi:attempt>
<esi:except>
<!--esi This spot is reserved for your company.s advertising. For more info
<a href="www.yahoo.com"> click here </a> -->
</esi:except>
</esi:try>
</td> </tr>
</table>
<esi:assign name="date_string" value="This is test"/>
<esi:vars> $(date_string) </esi:vars>


In access log of squid I get following error.

1110289050.099      0 255.255.255.255 TCP_DENIED/403 0 GET
http://www.yahoo.com - NONE/- text/html

Enabled access to all in squid.conf now I am getting following error.

1110351386.705    541 255.255.255.255 TCP_MISS/403 0 GET
http://www.yahoo.com - ANY_PARENT/<originserver> text/html


Is <esi:vars>$set_redirect('http://www.yahoo.com')</esi:vars> works for you
?

Regards
Nitesh Naik




----- Original Message ----- 
From: "Michal Pietrusinski" <michal.pietrusinski@xxxxxxx>
To: "Nitesh Naik" <nitesh@xxxxxxxx>
Cc: <squid-users@xxxxxxxxxxxxxxx>
Sent: Tuesday, March 08, 2005 8:34 PM
Subject: Re: [squid-users] Did Anyone used ESI with squid ?


> Hi Nitesh,
>
> I don't know if squid supports all ESI tags. I try to use only the basic
> <esi:include> tag and have problems.
>
> Could you, please, check, if <esi:include> works with your installation?
>
> If it works fine, you should see the page properly composed, and in the
> squid_installation/var/logs/access.log there should be entries, that the
> template and included pages where taken from the cache.
>
> I would be very gratefull if you could do that test.
>
> Regards,
> Michal
>
> Nitesh Naik napisaÅ(a):
> >
> > Michal,
> >
> > Thanks for your suggestion.
> >
> > Changed parser to custom and used following sample ESI code.
> >
> > <esi:assign name="test_string" value="This is test"/>
> > <esi:vars> $(test_string) </esi:vars>
> >
> > Its Working perfectly fine.  Is squid not supporting all ESI tags ?
> >
> > Regards
> > Nitesh Naik
> >
> >
> > ----- Original Message ----- 
> > From: "Michal Pietrusinski" <michal.pietrusinski@xxxxxxx>
> > To: "Nitesh Naik" <nitesh@xxxxxxxx>
> > Cc: <squid-users@xxxxxxxxxxxxxxx>
> > Sent: Tuesday, March 08, 2005 5:57 PM
> > Subject: Re: [squid-users] Did Anyone used ESI with squid ?
> >
> >
> >
> >>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
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >
>


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux