Varnish + LiteSpeed Compatibility

Advanced setup: Use Varnish as frontend cache with LiteSpeed backend.

Port Configuration

Set Varnish to listen on port 80, LiteSpeed on 8080.

LiteSpeed External App

LiteSpeed WebAdmin → External App → Add 'LSAPI' pointing to localhost:8080.

Basic Varnish VCL

Backend Definition

backend litespeed {
  .host = "127.0.0.1";
  .port = "8080";
}

Cache Purge Support

LiteSpeed Cache plugin has built-in Varnish purge support.

Cache Stack Benefits Table

LayerCache TypeBenefit
VarnishFull pageVery fast public cache
LiteSpeedPrivate/ESIDynamic content
OPcachePHP bytecodeScript execution