[opencms-dev] How is handle404 related to static export?
Stephan Hartmann
hartmann at metamesh.de
Wed Nov 30 08:28:32 CET 2005
Hi Nigel,
OpenCms handles static export on demand by default. In this configuration,
if a requested resource does not exist in the real file system of apache
(the rewrite condition checks this) it becomes forwarded to the 404
handler of OpenCms which checks if a resource for the request exists and
exports it if possible (i.e. images, static html pages and dynamic
resources where static export is set to true and cache parameters are
configured properly). For subsequent requests the resource exists in the
real file system and apache can serve it directly.
Cheers,
Stephan
> I've got Apache2 and Tomcat working together for multiple sites as
> per the documentation, (my virtual host config is at the end of this
> mail), and there's something I just don't get.
>
> Why do I need the Rewrite stuff for handle404? and how is this
> related to static exports?
>
> thanks for any illumination anyone can shed on this...
>
> <VirtualHost *:80>
> ServerName opencms.cofa.unsw.edu.au
> ServerAdmin webmaster at opencms.cofa.unsw.edu.au
> DocumentRoot "/usr/local/apache-tomcat-5.5.12/webapps/ROOT/"
> <Directory "/usr/local/apache-tomcat-5.5.12/webapps/ROOT/">
> Order allow,deny
> Allow from all
> </Directory>
> # Log only non-redirect requests in "normal" log file
> SetEnvIf Request_URI "\/cms\/*" redirect
> 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:8080/cms/handle404?
> exporturi=%{REQUEST_URI}&%{QUERY_STRING} [P]
> ProxyPass /cms/ !
> RedirectPermanent /cms/ http://
> opencms.cofa.unsw.edu.au/
> ProxyPass /resources/ !
> ProxyPass /export/ !
> ProxyPass / http://
> 127.0.0.1:8080/cms/
> ProxyPassReverse / http://
> 127.0.0.1:8080/cms/
> </VirtualHost>
>
>
> _______________________________________________
> 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
>
More information about the opencms-dev
mailing list