Configuration How-Tos

This section of the wiki provides articles on configuring LiteSpeed Web Server to achieve desired functionality, better performance, or security. These wikis do not cover what each LSWS setting does. That information can be found in our documentation.

Also LiteSpeed Cache, LiteMage Cache, PHP, and other external applications (Python, Ruby, etc.) are covered in their own sections of the wiki and are not included here.

Most of the time, users may use LSWS on a control panel environment and LSWS will read and run based on Apache configuration. You can also configure LSWS to read your existing Apache configuration if you have a working apache server running without control panel. In these scenarios, users may continue to set up everything in Apache, the same way as you did before.

Sometimes, users may run LSWS natively without a control panel. In this case, users can check LSWS native configuration through LSWS Admin Console.

Basic Command reference to run LSWS

Command ReferenceQuick Reference for All Commands

Understand Apache configuration

Someone may ask: Why I need to understand Apache configuration if I am using LSWS Web Server? LiteSpeed is a drop-in replacement on a control panel environment, which means LiteSpeed can read Apache configuration file and run LSWS based on Apache configuration. Most of the time, configuration changes on apache will reflect on LSWS as well directly.

Functionalities of the following Apache modules(but not limited to) have been implemented and the list is gradually expanding when new feature requests implemented. The partial list is:

mod_access, mod_actions, mod_alias, mod_auth, mod_auth_ldap, mod_auth_passthrough, mod_autoindex, mod_cache, mod_cgi, mod_expires, mod_fastcgi, mod_frontpage, mod_geoip, mod_gzip/mod_deflate, mod_jk, mod_mime, mod_php, mod_proxy, mod_rewrite, mod_security, mod_ssl, mod_suexec, and mod_throttle etc.

LiteSpeed web server also uses the same syntax for distributed configuration file (.htacess) and URL rewrite rules.

Please check apache documentation on how to configure and make changes to apache configuration here.

LSWS Native Configurations

LSWS ConfigLSWS Native Configuration Items

Performance tips

My site running slow, how to make it faster?How to improve my site performance?
My server load is high, how to resolve it?How to resolve my server load issue?
Controlling PHP ConcurrencyHow to control how many connections your PHP engine can serve at once
Understand LSWS "PHP suEXEC Max Conn" and Cloudlinux LVELSWS “PHP suEXEC Max Conn” should be always less than CL LVE EP


Enable QUICHow to Enable QUIC at the Server Level
Disable QUICHow to Disable/Enable QUIC at the VHost and Listener Levels
Quic makes quickerHow QUIC makes the web quicker
Supported Quic VersionsWhat Quic versions does LSWS support?


Enable PageSpeedHow to enable PageSpeed module
Compare PageSpeed and lscacheShould I turn on both PageSpeed and lscache?


Proxy as a ContextHow to setup LiteSpeed Web Server as a Proxy via Contexts
Proxy as a RewriteRuleHow to setup LiteSpeed Web Server as a Proxy via Rewrite Rules


GeoLocationHow to enable IP to GeoLocation


ip2locationHow to enable IP2Location

Header Settings

CORSHow to enable CORS on LSWS
Server PushHow to use Server Push on LSWS


Security OverviewLiteSpeed web server security overview
Mitigating SYN FloodsHow to harden your kernel against SYN floods
Shared Hosting SecurityAccess Permission isolation
suEXEC ModeProcess UID isolation: CGI/FCGI/LSAPI/PHP
chrootProcess Execution isolation
mod_security CompatibilityApache mod_security 2.5+ compatibility
Atomicorp setup and supportExplanation of Atomicorp's support of LSWS and how to set it up
CloudLinux CageFS How-ToInstallation and Configurations
Setting up HSTSHow to set up HTTP Strict Transport Security
Virtual Host-Level Bandwidth ThrottlingSet different bandwidth limits for different sites
Void CloudFlare IP/Subnet blockingHow to avoid LSWS Anti-ddos blocking CloudFlare IP/subnet connections
How to disable CGI scriptDisable all CGI scripts
WordPress Protection How WordPress Brute Force Protection works
Auth through Context or .htaccessHow to setup Site Authentication

How to mitigate DDoS attacks with LSWS's built-in security features

Mitigating HTTP-level DDoS AttacksHow to mitigate DDoS attacks with LSWS's security features
Understanding LiteSpeed Advanced Anti-DDos Setup ServiceFine tune anti-DDoS configurations and set up a script using iptables to automatically block attacking IPs detected by web server.

HTTPS/SSL Configuration

Create an SSL private keyHow to create a SSL private key
Self Signed SSL CertificateHow to create a self signed SSL certificate
Create a certificate requestHow to create a SSL certificate request for applying a trusted SSL certificate from CA issuer.
Install a SSL certificateHow to install a SSL certificate
Secure web admin consoleHow to secure web administration console with SSL
Redirect to https connectionHow to redirect from plain http connection to secured https connection
OCSP StaplingHow to set up OCSP stapling for faster SSL
Disabling HTTP/2Disabling HTTP/2 per virtual host


Syslog/Splunk LoggerHigh performance logging of litespeed logs to syslog/splunk via udp.
SNMP Monitoring + Cacti GraphingMonitor LiteSpeed real-time metrics via SNMP client and full-Cacti log/graph integration
Server Status + RRD GraphingMonitor LiteSpeed Server Status via RRD Graph
Piped LoggerFlexible logging with piped logger
AWstatsHow to use integrated AWstats log analyzer
New Relic Installation GuideHow to get New Relic to work with LSWS
Real-Time StatisticsReal-Time Statistics in Admin Console
Child process killed, is that normal?How to deal with “Child Process Killed” message in stderr.log


Bug ReportingHow to file a LiteSpeed bug report
Toggle Debug LoggingA feature for quickly switching between normal and very detailed log levels
How to Enable Rewrite LoggingThe first step in debugging rewrite rules
How to Debug my Rewrite RuleThe steps to check the failed rewrite rule

Streaming Media

FLV streamingFlash Video (FLV) Streaming (random seek)
MP4 streamingMP4/H264/F4V Video Streaming


Disable Brotli Per Account/DomainHow to disable Brotli on a per Account/Domain basis
Disable Brotli Per Server WideHow to disable Brotli Server Wide
gzip CompressionHow can I use gzip compression to save bandwidth?
Linux OS TuningHow to tune Linux OS for maximum performance for LiteSpeed.
File Descriptor LimitHow to increase the file descriptor limit
Internal RedirectFor those seeking x-sendfile or x-accel-redirect feature. We show you how with LiteSpeed.
nf_conntrack table“nf_conntrack: table full, dropping packet.” issue
Virtual Host-Level Bandwidth ThrottlingSet different bandwidth limits for different sites
Understanding RAM Disk Path SettingWill RAM disk setting help with I/O load issue
Understanding keep alive settingHow to set “keep alive” for my site

Miscellaneous Customization

Auto Index CustomizationHow to customize auto index script
Microsoft FrontPage Server Extensions 2002How to install Microsoft FrontPage Server Extensions 2002
MultiViewsHow to handle MultiViews
Enable HTTP2How to enable HTTP2
Disable TLS1.0How to disable TLS1.0 while enable TLS1.2 and TLS1.3
Add MIME typeHow to add MIME type if not exist
Show real IP behind a proxyHow to restore real visitor IP instead of proxy?
Special Rewrite Rule DirectivesUsing special directives in rewrite rules
Why my redirect from /cgi-bin/script working with apache but 404 on LSWS?How to fix the 404 error when redirecting /cgi-bin/script?

Virtual Hosting

Name-Based Virtual HostingHow to set up name-based virtual hosting
IP-Based Virtual HostingHow to set up IP-based virtual hosting

Troubleshooting errors

Understanding 500 errorWhat is 500 internal server error and how to fix it?
Understanding 404 errorWhat is 404 Not Found error and how to fix it?
Understanding 403 errorWhat may cause 403 error?

Setup LSWS as load balancer

Setup LSWS as load balancerHow to setup LSWS as load balancer?

Custom Templates

Custom templates can be used to make LSWS virtual hosts that have been prepared for popular web applications and plugins. All templates use LiteSpeed native configurations. They are unnecessary if you are migrating an existing site with web applications from Apache.

Virtual Host TemplatesHow to use a template to configure a group of virtual hosts with similar configurations
WP Super CacheTemplate and tutorial for quick and easy set up of LSWS with WordPress and WP Super Cache
W3 Total CacheHow to use a template to set up LSWS with WordPress and W3 Total Cache
Reverse ProxyUse a template to set up LSWS as a reverse proxy in under seven minutes
MediaWikiSetting up MediaWiki with LSWS is faster and easier with a template
phpBBSet up this popular open source bulletin board application with a template
phpListA tutorial and template for setting up phpList with LSWS
litespeed_wiki/config.txt · Last modified: 2018/06/29 20:19 by Jackson Zhang