Litespeed Configuration Guide
Prerequisites
LiteSpeed Web Server (OpenLiteSpeed or LiteSpeed Enterprise) installed and running
Admin access to LiteSpeed WebAdmin Console
A domain configured on a Virtual Host (e.g., litespeed.jtm-demo.com) with DNS pointing to your server
Step 1: Create an External App (Web Server)
Navigate to your Virtual Host, then open the External App tab and add a new Web Server definition with the following settings:
Field (Web Server Definition)
Example Value
Notes
Name
hash_proxy
Descriptive identifier referenced by rewrite rules
Address
https://hash.url.com
Full URL of backend (HTTP or HTTPS). Match your upstream scheme.
Max Connections
100
Range 1–2000. Tune based on backend capacity.
Connection Keepalive Timeout
60
Use persistent connections to improve performance; -1 disables.
Initial Request Timeout (secs)
60
Must be >= 1. Increase for slow upstreams.
Retry Timeout (secs)
1
Backoff window before retrying failed connections.
Response Buffering
No
Disable for streaming/low-latency responses.
Optionally set Environment variables and Notes as needed using PROPERTY=VALUE syntax.
If your backend uses HTTPS with a certificate that is self-signed or not publicly trusted, ensure your LiteSpeed build trusts the upstream or use HTTP to the backend within a private network.
Step 2: Enable and Add Rewrite Rules
Within the same Virtual Host, open the Rewrite tab.
In Rewrite Control, set Enable Rewrite to Yes. Optionally adjust Log Level.
In Rewrite Rules, click Edit and paste the following rules, then Save:
Gracefully restart LiteSpeed to apply the changes (Actions > Graceful Restart).
Please make sure to replace the values "hash" and "url.com" with your values from the DCP configuration page
Result
Requests to /kndmjf on your domain will be proxied to the external app defined as kndmjf_proxy, preserving query strings and forwarding the correct Host header to the upstream.
Last updated
Was this helpful?