[Zope3-Users] Workaround: file upload limit using zope behind apache

Klaus Bremer klaus.bremer at bmcct.de
Fri May 5 02:57:49 EDT 2006


----Ursprüngliche Nachricht----
am: Thu, 4 May 2006 13:31:00 +0200
von: Max M : maxm at mxm.dk

>I have seen this problem before if the browser is using a proxy. That 
>can limit the upload size too.


Good to know. In my case it's the apache mod_proxy module which caused
the trouble. I found the following workaround:

zope is running behind apache and there are three RewriteRule lines:

<VirtualHost ... :80>
 ...
	RewriteRule ^/static/(.*) - [L]
	RewriteRule ^(/?.*)/uploadForm http://my.domain.name:6502/localpath$1/
uploadForm [L]
	RewriteRule ^(/?.*) http://localhost:6502/localpath/++vh++http:%
{SERVER_NAME}:80/++/$1 [P,L]
</VirtualHost>

The first one is for static sources like css-files (I do it this way)
The third one is for the reverse proxy to zope
and the second one is the new one mapping to a view named "uploadForm"
from wich large files should be uploaded.

The second rewrite rule does not force apache to serve as a proxy, so
uploads from this form are not limited in size.

But there are two drawbacks:

You have to modify the 'uploadForm'-template so that links point back
according to the first and third rewrite rules (wich can be tricky) and,
of course, you have to open the port zope is listening to the public.

Avoiding the latter is one important argument to use apache, so I hope
the proxy bug will be fixed in the near future.

regards
-klaus





More information about the Zope3-users mailing list