July 14, 2021 . 4 MIN READ
https://docs.litespeedtech.com/cp/cpanel/switch-apache/
In a cPanel/WHM environment, LiteSpeed will automatically support your mod_security rules in the same place you would put them for Apache (in modsecurity.conf, etc.) There is no need to use LiteSpeed WebAdmin Console for mod_security rules.
LiteSpeed can disable mod_security related directives in .htaccess with a configuration option explained here.
For server-wide PHP configuration, LSWS uses the same php.ini as Apache: /usr/local/lib/php.ini. You need to enable Matching PHP integration from the LSWS cPanel/WHM plugin and build matching PHP in LSWS.
This also means that equivalent PHP extensions will be already installed when the web server is switched from Apache to LiteSpeed.
LSWS uses its own LSPHP (LSAPI + PHP) to execute PHP requests. It does not matter what you select within your cPanel.
It is similar to FCGI PHP. It has the same or better performance than apache DSO. PHP suEXEC can be enabled easily with a switch in LSWS.
In shared hosting, PHP suEXEC should be turned on for security purposes. LiteSpeed’s implementation of SuEXEC is much faster than any other PHP implementation’s. Refer to our benchmark results here.
No, LSPHP (with PHP suEXEC on) works just fine. We’ve had no reports of speed issues, configuration problems, or compatibility issues on cPanel/WHM servers.
No, LSWS standard configuration should handle a medium-loaded server (WordPress, Joomla, some static sites) just fine.
We usually recommend trying out our trial license. It’s equivalent to our two-worker Web Host Professional license, and is good for 15 days. If the litespeed or lshttpd process takes a lot of CPU on your server, then you know you will need to upgrade to a license that supports a higher number of CPUs.
Yes, you can create a fully customized error page for the whole server using Apache’s ErrorDocument Directive. The following example shows how it is done for a 403 Error page:
Create or edit this file: /usr/local/apache/conf/include/errordocument.conf
Add the following content:
ErrorDocument 403 /403.shtml
Alias /403.shtml /usr/local/apache/htdocs/403.shtml
Alias /cp_errordocument.shtml /usr/local/apache/htdocs/cp_errordocument.shtml
Where cp_errordocument.shtml is referenced in 403.shtml.
If a single user wants to change their own page, they can use this format in their .htaccess file or Apache vHost Configuration.
For a text-only error page:
ErrorDocument 403 "You are NOT allowed to access"
For an HTML error page:
ErrorDocument 403 /local403.shtml
LiteSpeed Web Server is a complete drop-in replacement for Apache. No changes are required. LSWS understands Apache configuration and behaves as you would expect Apache to.
Directory Index Priority also works without any changes and is completely supported.
Yes. There are 5 levels of error log, ERROR, WARNING, NOTICE, INFO, and DEBUG. ERROR is the equivalent for Apache cricital errors and is set up by default as they were in Apache.
In cPanel, log locations also remain same as they were in Apache.
Please refer to the dedicated troubleshooting guides for these errors: – 403 error – 500 error – 503 error
Check your server error and stderr logs located here in cPanel/WHM:
/var/logs/apache2/error_log/var/logs/apache2/stderr.logAlso refer to our Troubleshooting Menu to check for other guides related to cPanel/WHM.
You can turn keepalive on or off in the WebAdmin Console after installation. LiteSpeed works well even without keepalive.
Since LiteSpeed is event-driven, performance is much better. And, as server admin, you needn’t worry about rest parameters any more.
Just like with Apache, SSL certificates installed via WHM start working with LSWS right after they are added.