[opencms-dev] publish directly
Alexander Kandzior
alex at opencms.org
Sat Nov 27 02:12:38 CET 2004
> Alexander Kandzior wrote:
> > I would recommend a full static export only for sites that
> > are running
> > without an OpenCms system "behind" them. If you have a live OpenCms
> > available, static export "on demand" is the way to go...
>
> But that doesn't work. When I have "on-demand" and I display
> the top page
>
> http://meta.cesnet.cz/cms/opencms/cs/index.html
>
> the links in that page are pointing to for example
>
> http://meta.cesnet.cz/cms/export/sites/meta/cs/application/index.html
>
> but that files do not exist in that moment yet.
Sure they don't exist, that's why it's called "on demand", the files are
generated when they are requested the first time.
Technically, OpenCms implements an internal 404 handler. If a page is
requested that is not found, this handler is triggered. The OpenCms static
export manager then analyzes if the request was for a page that should have
been exported, and if so, it exports the page, at the same time also writing
it to the response stream. So if a page is requested for the first time,
it's exported "on demand", hence the name. Cool thing is that for all
subsequest requests, there's no 404 error since the page is now there, so
there's not even an overhead.
Only issue is that the Apache configuration for this is rather tricky, i.e.
if you run Tomcat behind Apache. We have a sample mod_proxy Apache / Tomcat
configuration, I just don't have it handy right now. If you are interested
I'll post it next week. In the meantime, try it on a test installation
without Apache http in front.
Best Regards,
Alex.
Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com
More information about the opencms-dev
mailing list