[opencms-dev] publish directly
Alexander Kandzior
alex at opencms.org
Mon Nov 29 11:37:43 CET 2004
> Oh, I see, I did not know that it is implemented thru 404 handler.
> Then my problem is indeed in the fact that Apache is serving
> tha pages and thus the 404 handler is not invoked.
Here's an example apache virtualhost config that enables static export "on
demand" with 6.0.
It's based on our Apachae httpd / mod_proxy / Tomact configuration.
------------------------------------------------------------
<VirtualHost *>
ServerName test.alkacon.com
ServerAdmin a.kandzior at alkacon.com
DocumentRoot "/var/tomcat4/webapps/ROOT/"
ErrorLog logs/error.log
# Redirect all request to non-existing file in the export directory to
OpenCms which will generate the files "on the fly"
RewriteEngine on
RewriteCond %{REQUEST_URI}
^/export/(.*) [NC]
RewriteCond "%{DOCUMENT_ROOT}%{REQUEST_FILENAME}"
!-f
RewriteCond
"%{DOCUMENT_ROOT}%{REQUEST_FILENAME}/index_export.html" !-f
RewriteRule .*
<http://127.0.0.1:8086/opencms/handle404?exporturi=%>
http://127.0.0.1:8086/opencms/handle404?exporturi=%{REQUEST_URI}&%{QUERY_STR
ING} [P]
# Also redirect all other 404 errors to OpenCms
ErrorDocument 404
/system/shared/handle404.html
RedirectPermanent /opencms/ <http://test.alkacon.com/>
http://test.alkacon.com/
ProxyPass /opencms/ !
ProxyPass /resources/ !
ProxyPass /export/ !
ProxyPass /skins/ !
ProxyPass /
<http://127.0.0.1:8080/opencms/> http://127.0.0.1:8080/opencms/
ProxyPassReverse /
<http://127.0.0.1:8080/opencms/> http://127.0.0.1:8080/opencms/
</VirtualHost>
------------------------------------------------------------
Best Regards,
Alex.
Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com
> -----Original Message-----
> From: opencms-dev-bounces at opencms.org
> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Martin Kuba
> Sent: Monday, November 29, 2004 10:27 AM
> To: The OpenCms mailing list
> Subject: Re: [opencms-dev] publish directly
>
> Alexander Kandzior wrote:
> > 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.
>
> Oh, I see, I did not know that it is implemented thru 404 handler.
> Then my problem is indeed in the fact that Apache is serving
> tha pages and thus the 404 handler is not invoked.
>
>
> Thanks
>
> Martin
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Supercomputing Center Brno Martin Kuba
> Institute of Computer Science email: makub at ics.muni.cz
> Masaryk University http://www.ics.muni.cz/~makub/
> Botanicka 68a, 60200 Brno, CZ mobil: +420-603-533775
> --------------------------------------------------------------
>
>
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list,
> please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20041129/b18f1af2/attachment.htm>
More information about the opencms-dev
mailing list