Changing OpenLiteSpeed Configurations

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.

This is LiteSpeed Enterprise syntax, can you confirm which server you are using?

1 Like

I’m not entirely sure what you mean by which server, but I went and checked my LiteSpeed version via SHH and it says it’s LiteSpeed/6.0 Enterprise. I also went ahead and checked my CyberPanel version and it’s version 2.1 Build 2 on CentOS 7 64Bit

Completely confusing. In your original post you are discussing about Openlitespeed and in you reply you are mentioning that when checked via SSH it says Litespeed Enterprise 6.0
Do understand that both the products are different in nature and doesnt work combined. You have to use either 1 of these 2.
Litespeed Enterprise vhost codes are different than Openlitespeed.

If it is LiteSpeed Enterprise maxReqBodySize should be changed at server level using LiteSpeed web admin.

I apologize for the confusion. My mistake, apparently it was OpenLiteSpeed before an upgrade was made to the server to LiteSpeed Enterprise. I had thought it was still the same since I am very new to handling web servers.

How does one possibly access LiteSpeed webadmin in Hostinger’s CyberPanel if you have any idea? I can’t really find an option for it anywhere on CyberPanel.

Just add port number 7080 to your server IP address instead of your cyberpanel port number which you have set (default is 8090) and press enter in the browser and you will be presented Litespeed Webadmin panel login. For example: 192.168.1.1:7080

The login details may have been supplied to you when you install cyberpanel for the first time in the SSH display area. If missed to save those, then do a password reset using SSH commands

/usr/local/lsws/admin/misc/admpass.sh 
1 Like

I did what you said and went to the webadmin panel and I’ve updated the maxReqBodySize and did a graceful restart, and it seems to be working now.

Thank you so much good sir!

1 Like

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.