📞 🇺🇸 +1 361 304 4309 📞 🇮🇳 +91 76769 02281 ✉️ [email protected]
Control Panels

How to Configure OpenLiteSpeed on CloudPanel

How to Configure OpenLiteSpeed on CloudPanel

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.

#openlitespeed #cloudpanel #nginx #performance
Share:
🛠️ Need Expert Help?

Don't want to do this yourself?

Our certified engineers implement this for you — correctly, securely, and within hours. Available 24/7 with 15-minute emergency response.

  • ✅ 19+ years experience
  • ✅ 60+ certified engineers
  • ✅ 1,600+ servers managed
  • ✅ 40+ countries served
  • ✅ Plans from $49/mo

Get Expert Help — Free Consultation

We respond within 4 hours · No commitment required

Please enter your name and a valid email.

No spam. Privacy Policy

Comments