Hi! I have a file uploading service that I created on my website (PHP) and I encountered an error when it comes to uploading files that are greater than 500MB (it works well on files under 500mb). I have set my post max limit and upload max file size to 1024M (since this setting works on my local server with no issues), this should have potentially allowed me to upload 500mb files.
After setting up my php config to allow file upload of up to 1024M/1G, it gives me a POST net::ERR_HTTP2_PROTOCOL_ERROR on the webpage’s console. As well as a [NOTICE] [xxxx] [T0] [xx.xxx.xx.xxx:xxxxx:HTTP2-3#APVH_*:443_website.com] Request body size: <filesize> is too big! error on my cyberpanel’s error logs.
After looking for possible solutions, as well as asking on stackoverflow, I’ve found that the problem might be my OpenLiteSpeed server and that it’s maxReqBodySize might be set to 500MB by default.
I’ve looked everywhere with regards to changing OpenLiteSpeed’s settings on CyberPanel but I haven’t gotten any luck since I haven’t found anything.
Someone on stackoverflow suggested changing my server’s maxReqBodySize since that could be the problem, but after attempting to edit my website’s vhost and adding:
tuning {
maxReqBodySize 2047M
maxDynRespSize 2047M
maxCachedFileSize 4096
}
At the end of my vhost, right after the VirtualHost:443 tag and after restarting OpenLiteSpeed, it still gives me the request body size is too big error.
Question: How do I change OpenLiteSpeed configurations and set the maxReqBodySize to the maximum allowable size on CyberPanel? (VPS on Hostinger). Does changing this setting also fix the error and issue I’ve been experiencing?
Edit: Apparently, it’s LiteSpeed Enterprise and not OpenLiteSpeed, my mistake. An upgrade was made from OpenLiteSpeed to LiteSpeed Enterprise which is why I thought it was still OpenLiteSpeed.