WebFaction
Community site: login faq
0
1

Hi. I have installed Redmine with the control panel. When I try to upload a file on the FILE tab, I receive a "413 Request Entity Too Large". I am only uploading a 1.9 MByte file, and the default limit is 5 MB. If I upload a small file, everything works (so it is not a permission issue). Does anybody know how to solve this problem? I have done a search on Google and on Webfaction's documentation and I don't find any help. Thanks, Francesco

asked 21 Nov '11, 05:35

mdsol
1111
accept rate: 0%


This is an Nginx error. You should try and raising the client_max_body_size directive, which assigns the maximum accepted body size of client request, to 5MB, so it would match your Redmine's settings. The default value is 1MB and that's why you are able to upload smaller files.

To raise that limit you need to edit your nginx.conf file, located at ~/webapps/<redmine_app>/nginx/conf/ directory, and then restart your nginx instance with the ~/webapps/<redmine_app>/bin/restart command.

Note that the "client_max_body_size" directive goes inside of the "server" context. Here's a basic example of nginx.conf with username "me" and application name "redmine":

env  GEM_HOME=/home/me/webapps/redmine/gems;
worker_processes  1;

events {
    worker_connections  1024;
}

http {
    access_log  /home/me/logs/user/access_redmine.log  combined;
    error_log   /home/me/logs/user/error_redmine.log   crit;

    include         mime.types;
    passenger_root  /home/me/webapps/redmine/gems/gems/passenger-4.0.2;
    passenger_ruby  /home/me/webapps/redmine/bin/ruby;
    sendfile        on;

    server {
        listen                   77777;
        client_max_body_size     20M;
        client_body_buffer_size  1M;
        passenger_enabled        on;
        root                     /home/me/webapps/redmine/hello_world/public;
        server_name              localhost;
    }
}

Note: be sure to use the appropriate passenger_root as well (this example uses "passenger-4.0.2")

permanent link

answered 21 Nov '11, 06:31

iliasr ♦♦
2.1k14
accept rate: 35%

edited 15 Nov '15, 04:37

ryans ♦♦
5.0k93159

Thank you illasr, you have solved the problem!

(21 Nov '11, 07:16) mdsol

worked! Thank you

(07 Oct '16, 21:14) pythonquick
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×186
×108
×81
×46

question asked: 21 Nov '11, 05:35

question was seen: 11,865 times

last updated: 07 Oct '16, 21:14

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM