[opencms-dev] Switching to static export on demand.
Michael Moossen
m.moossen at alkacon.com
Tue May 13 15:14:29 CEST 2008
Hi Andy!
> My question is this, when you publish changes to a template it doesn't
> seem to do anything with the exported resources. Therefore apache
> continues to serve the old version.
then something is wrong with you configuration...
first, the rewrite rule should look like these:
RewriteCond %{REQUEST_URI} ^/export/.*$
RewriteCond "%{DOCUMENT_ROOT}%{REQUEST_FILENAME}" !-f
RewriteCond "%{DOCUMENT_ROOT}%{REQUEST_FILENAME}/index_export.html" !-f
RewriteRule .*
${webapp}/${servlet}/handle404?exporturi=%{REQUEST_URI}&%{QUERY_STRING} [P]
where you have to set ${webapp} and ${servlet} to the right value, most
likely there is no webapp if OpenCms is installed as ROOT, and
${servlet} is opencms.
then it is important that the rfs-prefix and vfs-prefix values in your
opencms-importexport.xml are right, most likely your problem lies here.
the best to check this and to get a better idea how all this works just
quickly debug the A_CmsStaticExportHandler#scrubResource method, there
you will see where OpenCms tries to find the files, so you easily make
the configuration values to work.
HTH
Kind regards,
Michael
-------------------
Alkacon Software GmbH - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org
Andy Savin wrote:
> Hi all,
>
> We have been using Static Export After Publish until now but after
> speaking to various people at the conference I thought I might try out
> static export on demand.
>
> I have switched the export handler to on demand in
> opencms-importexport.xml and included a rfs rule for everything under the
> /sites folder.
>
> I have apache 2 looking at the export directory defined by that rule
> (/www/vhosts/bath-dev/opencms/)
>
> My plan is to point apache's 404 error page at OpenCms handle404 so that
> when a resource is removed from the export folder (i.e. when published)
> and apache can't find it gets served from the cms.
>
> My question is this, when you publish changes to a template it doesn't
> seem to do anything with the exported resources. Therefore apache
> continues to serve the old version.
>
> Am I missing something or is there a better way of doing this?
>
> I'm using version 7.0.4
>
> Regards
>
> Andy
>
More information about the opencms-dev
mailing list