Rmanaf
Rmanaf

Reputation: 81

File upload is limited to 1M, even after PHP, Nginx, and Apache configuration

I'm asking about an issue on a Wordpress website, that serves on an Ubuntu 18.04 behind of a WAF(Web Application Firewall) service.

The server was working for 1 year. 4 days ago I tried to upload a file and I got Http error.

upload_max_filesize and other values on configurations are about 2G.

First of all, I checked VM configs and I found out VM memory reduced to 4G. After increasing the memory amount, I did a check on Vestacp for the PHP, Nginx, and Apache configs, and they had no changes. Then I tried to upload, but this time on the local network and file uploaded successfully!

here are the questions:

And at last, how can I fix this?


Edited

Can someone explain the Juniper strategy and why it has done this?

Upvotes: 0

Views: 361

Answers (2)

Rmanaf
Rmanaf

Reputation: 81

The problem has solved after bypassing the WAF

Edited Feb 15, 2019

According to the network security administrator investigation on the issue, after a couple of malicious requests to the Server, WAF made the right decision by blocking the rest of them. However, we are trying to find the source of the requests. As a theory, MSN Bot doing this.

Upvotes: 0

Ice76
Ice76

Reputation: 1130

Double check your php.ini settings, look for upload_max_filesize and post_max_size. Both of those values affect the max upload size of a form. Also, dont forget to restart your server service after changes are made.

If that does not work, check the phpinfo(); function output to make sure your settings saved and that the appropriate php.ini file is loaded. If so,

check code for ini_set( ... ) functions. If there is one and it is changing it dynamically as the script executes, change it. Or, as a blanket fix, you can use that function and set the post max sizes to what you want. However, you should still investigate what is actually going on.

Upvotes: 1

Related Questions