Apache Migration FAQ¶
Where do I put mod_security rules?¶
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.
Can you turn off mod_security with .htaccess?¶
LiteSpeed can disable
mod_security related directives in .htaccess with a configuration option explained here.
Where does LiteSpeed keep php.ini?¶
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.
How do I set up LiteSpeed with PHP as DSO or PHP + suPHP?¶
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.
Do I need to turn PHP suEXEC on?¶
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.
Are you aware of any issues switching from Apache with PHP DSO and Apache with PHP SuPHP to LiteSpeed?¶
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.
Do I need to modify the standard LiteSpeed configuration to better handle sites on my medium-loaded servers?¶
No, LSWS standard configuration should handle a medium-loaded server (WordPress, Joomla, some static sites) just fine.
Choosing a License¶
Which LiteSpeed license do I need to buy?¶
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
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.
Custom Error Pages¶
Is it possible to remove the "Powered by LiteSpeed" information from default error pages served by LiteSpeed?¶
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:
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
cp_errordocument.shtml is referenced in
If a single user wants to change their own page, they can use this format in their
.htaccess file or Apache
For a text-only error page:
ErrorDocument 403 "You are NOT allowed to access"
For an HTML error page:
ErrorDocument 403 /local403.shtml
Changes in Apache Configuration¶
What changes do I need to make to my Apache configuration to make it work?¶
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.
Logging and Troubleshooting¶
Does LiteSpeed respect my Apache error log settings?¶
Yes. There are 5 levels of error log,
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.
How do I investigate 403, 500, or 503 errors?¶
How do I troubleshoot other errors?¶
Check your server error and stderr logs located here in cPanel/WHM:
- Server Error Log:
- Stderr Log:
Also refer to our Troubleshooting Menu to check for other guides related to cPanel/WHM.
How do I duplicate my advanced Apache keepalive configuration in LiteSpeed?¶
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.
Other Configuration Questions¶
How does LiteSpeed handle SSL certificates installed via WHM?¶
Just like with Apache, SSL certificates installed via WHM start working with LSWS right after they are added.
How does LiteSpeed handle addon domains, parked domains, and subdomains added via cPanel or WHM?¶
Just like with Apache, addon domains, parked domains, and subdomains added via cPanel or WHM start working with LSWS right after they are added.