By Dev Lexicon
Hello,
I’m not sure if this has been posted yet?
But whenever I try uploading a file over I would say 500MB from my website using the AWS PHP SDK kit for DigitalOcean Spaces; I ultimately get the error:
413 Request Entity Too Large
--------
nginx
The website is using a custom made PHP script in which I have coded.
I’ve checked my php.ini
file and my settings are set too:
file_uploads = On
max_execution_time = 300
max_file_uploads = 2000
max_input_time = 6000
memory_limit = 12000008M
post_max_size = 1000000M
upload_max_filesize = 1000000M
Am I missing something? Or does anyone have an idea why I can’t upload large items?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I’ve finally figured it out :)
After some further googling I came across this article from Plesk and tried the recommended method and it works!
I also found out that there’s also a direct extension that could be used on Plesk > “Panel.ini Editor
” and then just search for “[webserver] nginxClientMaxBodySize
” enter your value that you want; and you’re good!
Thank you to the Support Team here at DigitalOcean and @bobbyiliev for all the help!
Hi there @DevLexicon,
You would need to update your Nginx configuration and increase the client_max_body_size
.
To do that open the /etc/nginx/nginx.conf
file:
- sudo nano /etc/nginx/nginx.conf
And inside the http {
block add the following line:
client_max_body_size 500M;
After that run an Nginx config test:
- sudo nginx -t
And if you get Syntax OK
restart Nginx:
- systemctl restart nginx
Let me know how it goes! Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.