Join our Newsletter — 33% off our NHI Course
Home› Guides› LiteSpeed and OpenLiteSpeed Hardening Guide for Hosting Environments:…
Guide Web & API Security

LiteSpeed and OpenLiteSpeed Hardening Guide for Hosting Environments: WebAdmin, Sandboxing, Throttling and TLS

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 19 November 2026 13 min read
On this page

Hardening a LiteSpeed or OpenLiteSpeed server means protecting the WebAdmin Console, isolating the PHP and CGI processes that run customer code, limiting abusive clients, and keeping TLS and access rules tight on every virtual host. LiteSpeed Web Server and its open source edition, OpenLiteSpeed, are widely used to host PHP applications such as WordPress, often with many sites on one server. In a hosting environment a single weak site or an exposed admin console can affect every tenant. This guide covers the controls that matter most, using the setting names from the OpenLiteSpeed documentation.

The audience is hosting operators, system administrators and security teams running LiteSpeed family servers. The settings and paths in this guide come from the OpenLiteSpeed documentation. If you run LiteSpeed Web Server Enterprise, confirm each setting name and location in the Enterprise documentation before applying it. For application level guidance on the sites themselves, see the PHP and WordPress Security Guide.

This is an independent guide from NHI Mgmt Group, based on OpenLiteSpeed's public documentation as of November 2026. It is not sponsored or reviewed by LiteSpeed Technologies. Product features change, so confirm settings against the current OpenLiteSpeed or LiteSpeed documentation.

Key takeaways

  • The WebAdmin Console controls the whole server. Restrict network access to it, use a strong unique administrator credential, and never expose it to the public internet.
  • Virtual host configuration directories are owned by the lsadm user so that only the WebAdmin Console can change them. Keep that ownership intact.
  • Use the Bubblewrap Container feature to run PHP and CGI programs in a restricted sandbox, enabled per virtual host as the documentation recommends.
  • Per Client Throttling sets request rates, bandwidth caps and connection soft and hard limits per IP, with a grace period and a banned period.
  • Behind a proxy or CDN, set Use Client IP in Header correctly, or every visitor appears to come from the proxy and per IP controls stop working.
  • Never leave the HTTPS listener's SSL configuration blank. Use automatic certificates and OCSP stapling where available.
  • Block access to sensitive files and paths with contexts or rewrite rules, and add ModSecurity or CrowdSec for wider request filtering.

Threat model for LiteSpeed hosting servers

LiteSpeed servers in hosting environments usually run many virtual hosts, each with its own PHP application and often its own customer. The main risks follow from that shape:

  • Admin console takeover: anyone who reaches and logs in to the WebAdmin Console can change listeners, virtual hosts and external applications for every site.
  • Application compromise: a vulnerable plugin or theme on one site gives an attacker code execution as that site's PHP process. Exploiting public facing applications is catalogued as MITRE ATT&CK T1190.
  • Lateral movement between tenants: without process isolation, code running for one site may read files, configuration or credentials belonging to another.
  • Persistence through web shells: attackers drop scripts in writable web directories to keep access (MITRE ATT&CK T1505.003).
  • Volumetric and brute force abuse: floods of requests or connections, and repeated login attempts against hosted applications.
  • Credential exposure: TLS private keys, database passwords in application configuration and API keys stored in web roots.

Several of these involve non-human identities: the WebAdmin administrator account, the lsadm service user, the operating system users that PHP runs as, database accounts and the certificates on each listener. Each needs an owner and a minimal set of permissions.

Protect the WebAdmin Console

The WebAdmin Console is the management interface for the server. The OpenLiteSpeed configuration documentation explains that a virtual host's conf directory is owned by lsadm:lsadm, so that only the WebAdmin Console can change that virtual host's configuration. That design makes the console the gatekeeper for server configuration, and therefore the highest value target on the box.

NHI Mgmt Group recommends:

  • Restrict network reach: allow the console's listener only from management networks or through a VPN or bastion. Check which port your installation uses for the console and block it at the host firewall and any cloud security group for every other source.
  • Use a unique, strong administrator credential: do not reuse the password from any other system, store it in a password manager or vault, and change it when an administrator leaves.
  • Limit who holds it: keep the number of people with console access small and record who they are.
  • Keep ownership intact: do not change ownership or permissions on conf directories to work around the console. Configuration changes should go through the console or a controlled automation path.
  • Use TLS for the console: administrator sessions should never cross the network in plain text.

An exposed management console with a weak password is one of the fastest routes to a full server compromise. Treat it with the same care as SSH root access.

Isolate tenants and external applications

In a hosting environment, the most important control after the console is keeping each site's code from touching the others.

Bubblewrap Container

The OpenLiteSpeed documentation describes Bubblewrap as a lightweight sandbox application, developed from Flatpak, that OpenLiteSpeed uses to launch CGI and PHP programs in a restricted environment. The default command mounts only selected system directories, the user's home directory and certain database sockets, and isolates the process. The documentation notes that shells cannot be run from inside the sandbox.

Key points from the documentation:

  • Install bubblewrap first. Version 0.3.1 or higher is required, and 0.3.3 or higher is strongly recommended. Check with bwrap --version.
  • In the WebAdmin Console, the server level setting is in Server Configuration > Security, under the Containers group, with Bubblewrap Container and an optional Bubblewrap Command.
  • The documentation recommends leaving the feature Off at server level and enabling it per virtual host under the virtual host's Security tab.
  • If the server level value is Disabled, the documentation's table shows that turning it on at virtual host level has no effect. Use Off, not Disabled, at server level if you plan to enable it per virtual host.
  • Restart LiteSpeed after changes, and if the site uses PHP, stop running lsphp processes so they pick up the new configuration.
  • The documentation suggests --die-with-parent in custom commands to avoid orphaned processes, and gives workarounds for systems where --unshare-all fails and for cache directories that need a writable bind.

Test each site after enabling the sandbox. The documentation suggests a directory listing script to compare what is visible with the sandbox on and off.

Scripts and restraint per virtual host

Each virtual host has an Enable Scripts/ExtApps setting and a Restrained setting. Only enable scripts on virtual hosts that need them, and review the Restrained setting for each tenant against the current documentation, since it governs how far a virtual host's configuration can reach.

Separate operating system users

NHI Mgmt Group recommends running each tenant's PHP processes as its own operating system user, with file ownership set so one tenant cannot read another's files. The OpenLiteSpeed documentation also covers cgroups for resource limits and CGI application server settings; review both when building a multi tenant layout. Database accounts should follow the same pattern: one account per site, with rights only on that site's database.

Throttle abusive clients

OpenLiteSpeed's Per Client Throttling settings are found under the server's security configuration. They work per client IP address and cover three areas.

SettingDocumented defaultPurpose
Static Requests/second0Request rate limit for static files
Dynamic Requests/second0Request rate limit for dynamic content
Outbound Bandwidth (bytes/sec)0 (disabled)Caps outbound traffic per client
Inbound Bandwidth (bytes/sec)0 (disabled)Caps inbound traffic per client
Connection Soft Limit10000Concurrent connections from one IP that start the grace period check
Connection Hard Limit10000Concurrent connections from one IP above which new connections are closed immediately
Grace Period (sec)15How long an IP may stay above the soft limit before it is banned
Banned Period (sec)300How long a banned IP is refused

The documented defaults are permissive, so tune them. The documentation's own example uses a soft limit of 15, a hard limit of 20, a grace period of 15 seconds, a banned period of 60 seconds, 2 dynamic and 40 static requests per second, and Block Bad Request set to Yes. Start from values like these, watch the error log (where the documentation says bans are recorded), and adjust for sites with heavy legitimate traffic.

Two further points from the documentation are worth applying:

  • Adding an IP with a trailing T in the server Allowed List marks it as trusted, exempting it from client throttle limits and DDoS detection. Use this only for your own monitoring and infrastructure addresses, and review the list regularly.
  • IPs that repeatedly break the soft limit are candidates for the Denied List.

The documentation also notes the hard limit does little against attackers who use only a few connections per IP, so pair throttling with application level controls such as CAPTCHA on login pages. OpenLiteSpeed documents a CAPTCHA feature for this.

Get client IPs right behind proxies and CDNs

Many hosting servers sit behind a CDN or load balancer. The access control documentation warns that the server setting Use Client IP in Header (Server Configuration > General) must be set correctly, otherwise every visitor appears as the proxy's IP. If that happens, throttling bans the proxy, access rules based on IP stop meaning anything, and logs lose the real source of attacks.

NHI Mgmt Group recommends trusting forwarded client IP headers only from your known proxy addresses, so an attacker connecting directly cannot set the header to spoof an allowed address. Where possible, block direct access to the origin from anywhere except the proxy.

Control access to sensitive paths and files

OpenLiteSpeed supports several ways to block requests, documented on its access control page:

  • Static contexts: a context with Accessible set to No denies everyone; set to Yes, it allows filtering with Access Allowed and Access Denied lists.
  • Rewrite rules: for example, RewriteRule ^/.*\.(log|ini)$ - [F,L] blocks log and ini files, and a rule with a RewriteCond %{REMOTE_ADDR} condition can limit a directory to one IP.
  • .htaccess: with Auto Load from .htaccess enabled, the same rules can live in a site's .htaccess file. Restart OpenLiteSpeed after changes, as the documentation notes.

Practical uses in hosting include blocking backup files, logs, configuration files and version control directories in web roots, and limiting application admin paths to known addresses where that fits the customer. The documentation gives an example of blocking a single file such as an XML-RPC endpoint when a site does not use it.

Because the ability to load .htaccess files lets each site add rules, it also lets a compromised site weaken its own rules. Keep critical blocks at the server or virtual host level, not only in .htaccess.

TLS, certificates and security headers

The configuration documentation explains that listener SSL uses a Private Key File, Certificate File and Chained Certificate, that virtual host SSL settings override listener SSL, and warns that you must not leave the HTTPS listener's SSL configuration blank. It also notes that only one process per IP address can bind to ports 80 and 443, so one HTTP and one HTTPS listener are recommended.

OpenLiteSpeed documents automatic certificate issuance through ACME and OCSP stapling, as well as a security headers feature. NHI Mgmt Group recommends:

  • Automate certificate issuance and renewal for every virtual host, so expiry does not push sites back to HTTP.
  • Protect private key files with permissions limited to the server process, and keep them out of web roots and backups that customers can download.
  • Redirect HTTP to HTTPS on every virtual host and set security headers such as HTTP Strict Transport Security once HTTPS is reliable.
  • Follow current TLS configuration guidance such as NIST SP 800-52 Rev. 2 for protocol versions and cipher suites.
  • Remove or firewall the example default listener if it is not in use. The configuration documentation shows a default listener on port 8088 for all IPs.

For background on how certificates and handshakes work, see the How TLS Works Guide.

Request filtering, monitoring and patching

The OpenLiteSpeed documentation lists a ModSecurity module and a CrowdSec integration among its security features. ModSecurity applies web application firewall rules to requests; CrowdSec uses shared signals about abusive IPs. Either can add a layer above per client throttling. Test rule sets on staging first, since overly broad rules break hosted applications.

Monitoring and maintenance complete the picture:

  • Send the server error.log, access logs and stderr.log to central logging, and alert on bans, console logins and configuration changes.
  • Watch hosted web roots for new or changed PHP files, a common sign of web shells. See How to Hunt for Web Shells on IIS, Apache and Nginx.
  • Patch the server, its PHP builds and the operating system on a set schedule, and subscribe to the vendor's release announcements.
  • Keep an inventory of virtual hosts with their owner, PHP version and whether sandboxing is enabled.

Common failure patterns

  • Console on the internet: the WebAdmin Console listener reachable from any address, protected only by a password.
  • Shared admin credential: one console password known by many staff and never rotated.
  • No tenant isolation: every site's PHP running as the same user, with no sandbox, so one compromised site exposes the rest.
  • Sandbox switched off by accident: Bubblewrap set to Disabled at server level, which overrides per virtual host settings.
  • Default throttling: connection limits left at the permissive defaults.
  • Wrong client IP: Use Client IP in Header not set behind a CDN, so bans and IP rules hit the proxy instead of attackers.
  • Over broad trusted IPs: large ranges marked trusted in the Allowed List, exempting them from throttling.
  • Protection only in .htaccess: critical rules kept only where a compromised site can edit them.
  • Blank or expired SSL: HTTPS listeners without proper certificate settings, or manual certificates that lapse.

Practitioner checklist

  • Restrict the WebAdmin Console to management networks and confirm it is not reachable from the internet.
  • Set a unique administrator credential, store it in a vault and limit who can use it.
  • Confirm virtual host conf directories remain owned by lsadm:lsadm.
  • Install a supported bubblewrap version, set server level to Off and enable Bubblewrap Container per virtual host.
  • Run each tenant as its own operating system user with its own database account.
  • Tune Per Client Throttling from the permissive defaults and set Block Bad Request.
  • Set Use Client IP in Header correctly behind proxies, and trust forwarded headers only from known proxies.
  • Review the Allowed List, especially trusted entries, and the Denied List every quarter.
  • Block sensitive file types and paths at server or virtual host level.
  • Configure SSL on every HTTPS listener, automate certificates and enable OCSP stapling.
  • Enable request filtering such as ModSecurity or CrowdSec after testing, and centralise logs.

Standards and references

Related NHI Mgmt Group resources: PHP and WordPress Security Guide · WordPress Security Checklist · How to Hunt for Web Shells on IIS, Apache and Nginx · How TLS Works Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.