<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR></HEAD>
<BODY><!-- Converted from text/plain format -->
<P><FONT size=2>> Oh, I see, I did not know that it is implemented thru 404
handler.<BR>> Then my problem is indeed in the fact that Apache is
serving<BR>> tha pages and thus the 404 handler is not invoked.<BR><BR>Here's
an example apache virtualhost config that enables static export "on demand" with
6.0.<BR>It's based on our Apachae httpd / mod_proxy / Tomact
configuration.<BR><BR>------------------------------------------------------------<BR><FONT
face="Courier New"><VirtualHost *><BR> ServerName
test.alkacon.com<BR> ServerAdmin
a.kandzior@alkacon.com<BR> DocumentRoot
"/var/tomcat4/webapps/ROOT/"<BR> ErrorLog
logs/error.log<BR><BR> # Redirect all request to non-existing
file in the export directory to OpenCms which will generate the files "on the
fly"<BR> RewriteEngine
on<BR> RewriteCond
%{REQUEST_URI}
^/export/(.*) [NC]<BR>
RewriteCond
"%{DOCUMENT_ROOT}%{REQUEST_FILENAME}"
!-f<BR> RewriteCond
"%{DOCUMENT_ROOT}%{REQUEST_FILENAME}/index_export.html"
!-f<BR> RewriteRule
.*
</FONT><A href="http://127.0.0.1:8086/opencms/handle404?exporturi=%"><FONT
face="Courier New"><A
href="http://127.0.0.1:8086/opencms/handle404?exporturi=%{REQUEST_URI}&%{QUERY_STRING">http://127.0.0.1:8086/opencms/handle404?exporturi=%</FONT></A><FONT
face="Courier New">{REQUEST_URI}&%{QUERY_STRING</A>}
[P]<BR><BR> # Also redirect all other 404 errors to
OpenCms<BR> ErrorDocument
404
/system/shared/handle404.html<BR><BR> RedirectPermanent
/opencms/
</FONT><A href="http://test.alkacon.com/"><FONT
face="Courier New">http://test.alkacon.com/</FONT></A><BR><FONT
face="Courier New">
ProxyPass
/opencms/
!<BR><BR>
ProxyPass
/resources/
!<BR>
ProxyPass
/export/
!<BR>
ProxyPass
/skins/
!<BR><BR>
ProxyPass
/
</FONT><A href="http://127.0.0.1:8080/opencms/"><FONT
face="Courier New">http://127.0.0.1:8080/opencms/</FONT></A><BR><FONT
face="Courier New"> ProxyPassReverse
/
</FONT><A href="http://127.0.0.1:8080/opencms/"><FONT
face="Courier New">http://127.0.0.1:8080/opencms/</FONT></A><BR><FONT
face="Courier New"></VirtualHost></FONT><BR>------------------------------------------------------------<BR><BR>Best
Regards,<BR>Alex.<BR><BR>Alexander Kandzior<BR>Alkacon Software - The OpenCms
Experts<BR><A
href="http://www.alkacon.com">http://www.alkacon.com</A><BR><BR><BR><BR>>
-----Original Message-----<BR>> From: opencms-dev-bounces@opencms.org<BR>>
[<A
href="mailto:opencms-dev-bounces@opencms.org">mailto:opencms-dev-bounces@opencms.org</A>]
On Behalf Of Martin Kuba<BR>> Sent: Monday, November 29, 2004 10:27
AM<BR>> To: The OpenCms mailing list<BR>> Subject: Re: [opencms-dev]
publish directly<BR>><BR>> Alexander Kandzior wrote:<BR>> > Sure
they don't exist, that's why it's called "on demand",<BR>> the files<BR>>
> are generated when they are requested the first time.<BR>> ><BR>>
> Technically, OpenCms implements an internal 404 handler. If<BR>> a page
is<BR>> > requested that is not found, this handler is triggered. The
OpenCms<BR>> > static export manager then analyzes if the request was
for<BR>> a page that<BR>> > should have been exported, and if so, it
exports the page,<BR>> at the same<BR>> > time also writing it to the
response stream. So if a page<BR>> is requested<BR>> > for the first
time, it's exported "on demand", hence the name. Cool<BR>> > thing is that
for all subsequest requests, there's no 404<BR>> error since<BR>> > the
page is now there, so there's not even an overhead.<BR>> ><BR>> >
Only issue is that the Apache configuration for this is<BR>> rather tricky,
i.e.<BR>> > if you run Tomcat behind Apache. We have a sample
mod_proxy<BR>> Apache /<BR>> > Tomcat configuration, I just don't have
it handy right now.<BR>> If you are<BR>> > interested I'll post it next
week. In the meantime, try it<BR>> on a test<BR>> > installation
without Apache http in front.<BR>><BR>> Oh, I see, I did not know that it
is implemented thru 404 handler.<BR>> Then my problem is indeed in the fact
that Apache is serving<BR>> tha pages and thus the 404 handler is not
invoked.<BR>><BR>><BR>> Thanks<BR>><BR>> Martin<BR>>
--<BR>>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR>>
Supercomputing Center
Brno
Martin Kuba<BR>> Institute of Computer Science email:
makub@ics.muni.cz<BR>> Masaryk
University
<A
href="http://www.ics.muni.cz/~makub/">http://www.ics.muni.cz/~makub/</A><BR>>
Botanicka 68a, 60200 Brno, CZ mobil:
+420-603-533775<BR>>
--------------------------------------------------------------<BR>><BR>><BR>>
_______________________________________________<BR>> This mail is send to you
from the opencms-dev mailing list<BR>> To change your list options, or to
unsubscribe from the list,<BR>> please visit<BR>> <A
href="http://mail.opencms.org/mailman/listinfo/opencms-dev">http://mail.opencms.org/mailman/listinfo/opencms-dev</A><BR>><BR>>
</FONT></P></BODY></HTML>