0

I have scoured the web and turned up no results so far. So my last effort is to ask here, hopefully this may shed some light on this.

I cannot get the max upload size above 2mb.

My guess is the issue is with plesk, it seems to have no options to set up the nginx configs even though it generates them automatically. Making it pointless for me to edit them manually in SSH.

PHP has these settings for every virtual host:

memory_limit 64M;

post_max_size 32M;

upload_max_filesize 16M;

nginx in the http block has this (the one area I can edit without plesk changing back):

client_max_body_size 64M;

client_body_buffer_size 128k;

plesk generated this automatically in every nginx server block:

client_max_body_size 128m;

The error usually given is a 413 with NGINX, leading me to believe php in unrelated (but server errors do not always reflect the actual problem).

Nginx routes the connection to apache through a proxy, however there is no configs that I can find for apache, just "httpd" and the config for that is automatically generated as well. Because the error I see is generated from nginx I am hesitant to believe apache is where the problem is (but I will note it here incase anyone has different thoughts)

I have spent a few hours so far in both command line and the plesk admin panel. Both so absolutely no relation to the 2MB limit. A "guess" i have is that I need to add the client_max_body_size to the location block as well, however that would mean reformatting the server without plesk witch is not an option.

So to clear up any confusion what I am asking is if there is anywhere else that nginx/apache/php might setup a limit other then their respective configuration files, or if plesk may have a secret hidden config for them that I am unable to locate.

EDIT: Based on comments here is some more info:

The phpinfo file shows all settings as being proper as per plesk settings.

the php.conf file in /etc/httpd/conf.d/ has no LimitRequestBody.

the fcgid.conf file's FcgidMaxRequestLen is 1073741824

Community
  • 1
  • 1
Jordan Ramstad
  • 169
  • 3
  • 8
  • 37
  • Have you verified that you are writing to the right PHP config files? Do a `phpinfo()` dump just to make sure. You should be able to edit nginx.conf and restart the service... If it doesn't work, move the client_max_body_size directive outside of the server block. Some good info: http://forum.slicehost.com/index.php?p=/discussion/1714/nginx-413-when-uploading-file-1mb-or-larger/p1 – Rob W Jun 04 '13 at 21:17
  • phpinfo did verify proper settings for php anyway. I already have edited the nginx.conf file and restarted the server, trying multiple minor variations. Funny fact is that I have read that post and tried it :). Because of the generated nginx configs other then the main, I cannot edit the location blocks directly. – Jordan Ramstad Jun 04 '13 at 21:25
  • Check FcgidMaxRequestLen in /etc/apache2/conf.d/fcgid.conf : FcgidMaxRequestLen 1073741824 This will give it 1GB if it's not set right – Panama Jack Jun 04 '13 at 21:38
  • Also check your LimitRequestBody in /etc/httpd/conf.d/php.conf if that is too small apache could be limiting it too. – Panama Jack Jun 04 '13 at 21:43
  • there is no apache2 or apache folder, there is an httpd folder though and the fcgid.conf file has FcgidMaxRequestLen 1073741824 the same as you listed. Also in the php.conf there is no LimitRequestBody. – Jordan Ramstad Jun 04 '13 at 22:02
  • 1
    The answer to your problem : http://stackoverflow.com/questions/18177208/increase-upload-size-on-nginx/18184134#18184134 – Jizbo Jonez Aug 12 '13 at 10:01

1 Answers1

1

I changed /usr/local/psa/admin/conf/templates/default/nginxWebmailPartial.php
Then I performed plesk sbin httpdmng --reconfigure-all
Finally, I performed service nginx restart and everything worked.

I found that fine but going to /usr/local/psa/admin/conf which is where my version of Plesk stores vhost config files and did a recursive grep grep -ir client_ * and found the only file that listed the client_max_body_size 128m; and changed it to 2048m which was big enough for me.