When uploading a file over HTTP, return 403 Request Entity Too large error, because the default setting allows the upload file is too small, the default is 2M, if the upload file size is greater than 2M, then will return 413 error, Modify Nginx configuration file nginx.conf, in the HTTP {} segment, the server {} Outside of the client_max_body_size option, if the comment should be removed if the comment modified value, if you do not need to manually add, the following configuration:
Client_max_body_size 8m;
This is changed to 8m, usually enough, after saving to execute ./sbin/nginx-s Reload Reload the configuration file to take effect, uploading the file again is normal.
LNMP Environment, PHP itself also has to handle the upload file size settings, which need to modify the PHP installation directory under the php.ini configuration file, modified to the following configuration:
Post_max_size == 8M
Once saved, reboot php-fpm to take effect
Linux under the nginx,php environment, it is generally necessary to modify the above parameters to achieve the size limit of the upload file
Nginx upload file returned 413 resolution