Fixing Annoying Linux Server Configuration Issues

Nginx returns 413 – Request Entity Too Large when attempting to upload a file larger than 2 MB

In /etc/nginx/nginx.conf , add this line or change the existing line to: client_max_body_size 256M;

 

WordPress reports The uploaded file exceeds the upload_max_filesize directive in php.ini.

In /etc/opt/rh/rh-php70/php.ini change upload_max_filesize from 2M to a larger number, like 128M

Some other things to consider in php.ini:

max_execution_time = 60

memory_limit = 256M

post_max_size = 128M