Path

ez projects / ezsi / forum / general / si-blocks are not fetched w...


si-blocks are not fetched when using siteaccess in URI

You need to be logged in to post messages in the forums. New users may register here.

Valentin Doroschuk

Member since:
09 January 2008

Posts: 3

Wednesday 21 April 2010 11:54:57 am

Hi,
I'm trying to install Varnish and eZSI and could not get it work due to I use MathOrder=uri
If I visit site like http://host.com/siteaccess/
Varnish every time tries to fetch si blocks using siteaccess
like http://host.com/siteaccess/var/si-blocks/....

This hack resolves it.




Index: ezsiblockfunction.php


===================================================================


--- ezsiblockfunction.php       (revision 54392)


+++ ezsiblockfunction.php       (working copy)


@@ -107,7 +107,7 @@


 

                    if( $SIFileHandler == 'fs' )


                    {


-                       $blockFilePathPreprendString = 'var/';


+                       $blockFilePathPreprendString = '/var/';


                    }


 

                    $filePath = $blockFilePathPreprendString . $cacheDir . '/' . $fileName;




Could you please tip how to configure eZSI or Varnish to get it work without this hack?
Thanks
Up

Alexandre Nion

Member since:
09 January 2008

Posts: 5

Wednesday 21 April 2010 2:24:46 pm

Hi Valentin,

As I just wrote in thread http://projects.ez.no/ezsi/forum/general/blocks_not_showing_wrong_src , it seems for me not possible use as is (because of relative path). You may need a workaround to make it work (as yours).
Maybe a bit easier/smart (as the hack is deported), it's also possible to just handle it in your varnish vcl :



set bereq.url = "/";


esi;



This will change the seen url for Varnish before parsing tags, and then use the given path to generate ESI requests.

Good luck
Up

Valentin Doroschuk

Member since:
09 January 2008

Posts: 3

Wednesday 21 April 2010 2:43:14 pm

Super. Thanks
Up

You need to be logged in to post messages in the forums. New users may register here.