Jordan Ramstad
Jordan Ramstad

Reputation: 179

Plesk/nginx uploading issue

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

Upvotes: 0

Views: 2217

Answers (1)

Father0fnine
Father0fnine

Reputation: 11

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.

Upvotes: 1

Related Questions