[opencms-dev] Ability to export pages as static html files
Christian Steinert
christian_steinert at web.de
Thu May 10 17:08:30 CEST 2007
Dear Michael,
What you write about is called "static export on demand" and you are right, it is more like a caching mechanism.
But there is also a "real" export to the file system. This is called "static export after publish". As soon as something is published, the website is re-exported completely into the file system. I use this feature in production and it works well for me. On our site, all static pages are only served from the filesystem through apache. Opencms is not at all involved in this. See http://opencms-wiki.org/Static_Export_configuration for more details about this.
===
IMO, there are basically two issues, if you want to use static export so that you don't have to expose opencms at all to external requests:
- Export runs can take several minutes and they must happen, whenever *any small thing* is exported. To address this, I have written a small export manager, that exports in a background task, so that users don't have to wait for this. You can find it at http://opencms-wiki.org/Static_Export_after_publish_in_the_Background
- *during* a static export run, opencms will delete some files, before it starts re-publishing stuff. The result of this is, that sometimes, files are not awailable for a short time, before becoming re-published. I have worked around this with a small perl-script which copies files from the opencms export folder to a different folder, which is then served by apache. My script will leave files around, until the export run has finished completely, in order to avoid files from disappearing shortly from time to time. If you are interested in the script, you could send a personal mail and I can mail it to you.
For me, this combination works well, without directly exposing opencms at this point.
hth
christian
_______________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192
More information about the opencms-dev
mailing list