CloudPanel primarily uses Nginx but OpenLiteSpeed can be configured alongside it for sites requiring maximum PHP performance via the LiteSpeed API.
CloudPanel Default Stack vs OLS
# CloudPanel default
Internet → Nginx (443) → Varnish (6081) → Nginx (8080) → PHP-FPM
# With OpenLiteSpeed
Internet → Nginx (443) → Varnish (6081) → OLS (8080) → LSPHP
# LSPHP is 40-60% faster than PHP-FPM for most workloads
Step 1 — Install OpenLiteSpeed Alongside CloudPanel
sudo wget -O - https://repo.litespeed.sh | sudo bash
sudo apt update
sudo apt install openlitespeed lsphp82 lsphp82-mysql lsphp82-curl -y
Step 2 — Configure OLS on Port 8080
sudo nano /usr/local/lsws/conf/httpd_config.conf
listener Default {
address *:8081
secure 0
}
# Use port 8081 to avoid conflict with CloudPanel Nginx on 8080
Step 3 — Configure Virtual Host
sudo nano /usr/local/lsws/conf/vhosts/yourdomain/vhconf.conf
docRoot /home/cloudpanel-user/htdocs/yourdomain.com/
index {
useServer 0
indexFiles index.php, index.html
}
extprocessor lsphp82 {
type lsapi
address uds://tmp/lshttpd/lsphp82.sock
maxConns 35
env PHP_LSAPI_CHILDREN=35
initTimeout 60
retryTimeout 0
pcKeepAliveTimeout 5
respBuffer 0
autoStart 1
path /usr/local/lsws/lsphp82/bin/lsphp
}
Step 4 — Update Nginx to Proxy to OLS
# In CloudPanel Vhost — change backend port
proxy_pass http://127.0.0.1:8081;
Benchmark Comparison
ab -n 1000 -c 20 https://yourdomain.com/
# Typical results:
# PHP-FPM: 450 req/sec
# LSPHP: 720 req/sec (60% improvement)
Conclusion
LSPHP delivers measurable performance gains for PHP-heavy sites. Our team configures advanced server stacks including OpenLiteSpeed with CloudPanel.
Comments