How to limit max file upload size

178 views
Skip to first unread message

MarcoJ

unread,
Nov 27, 2008, 9:31:07 AM11/27/08
to Phusion Passenger Discussions
Hi,

I want to restrict the maximum size of files that are uploaded to my
site. Normally I would do that in Apache, but it doesn't seem to work
with mod_rails.

I have added the following lines to my apache configuration file:
LimitRequestBody 15000000
ErrorDocument 413 /413.html

Now two things will happen, either 413.html will be displayed, but a
couple of lines are added:
"Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, y...@example.com and inform
them of the time the error occurred, and anything you might have done
that may have caused the error.
More information about this error may be available in the server error
log."

Or, the browser will tell me that "the connection has been reset".

Am I doing something wrong? Is there a better way to do it?

Thanks,

Marco
Reply all
Reply to author
Forward
0 new messages