39 lines
1.8 KiB
Smarty
39 lines
1.8 KiB
Smarty
|
|
## ---- shared-ols append (do not edit below) ----
|
||
|
|
## Server-level config for the SHARED OpenLiteSpeed tier. Appended to the
|
||
|
|
## stock httpd_config.conf AFTER render-shared-ols-config.sh strips the stock
|
||
|
|
## listeners, vhTemplate docker, AND the stock `extProcessor lsphp` +
|
||
|
|
## `scriptHandler` (so this server NEVER runs PHP locally — every site's PHP
|
||
|
|
## goes to its own detached cac-lsphp sidecar over LSAPI). Rendered with
|
||
|
|
## envsubst; only ${LSCACHE_ROOT} is substituted here.
|
||
|
|
|
||
|
|
serverName shared-ols
|
||
|
|
|
||
|
|
## Real client IP behind HAProxy. HAProxy sets X-Forwarded-For (the real
|
||
|
|
## client) and X-Forwarded-Proto. Mode 2 = trust the proxy header. HAProxy is
|
||
|
|
## the only thing that ever connects to this tier (it's not publicly exposed),
|
||
|
|
## so trusting the header from the docker-network peer is safe — same trust
|
||
|
|
## model as the shared httpd's RemoteIPInternalProxy.
|
||
|
|
useIpInProxyHeader 2
|
||
|
|
|
||
|
|
## LSCache enabled at MODULE scope for the whole tier (dedicated cache volume,
|
||
|
|
## ephemeral across rebuilds; OLS auto-keys a per-vhost subdir under storagePath).
|
||
|
|
## enableCache/enablePrivateCache ON here means the cache module is ACTIVE, but a
|
||
|
|
## response is only cached if it's marked cacheable — the LiteSpeed Cache WP
|
||
|
|
## plugin sets X-LiteSpeed-Cache-Control headers, and checkPublic/PrivateCache +
|
||
|
|
## ignoreRespCacheCtrl=0 make OLS honor them. No plugin → nothing cached (safe).
|
||
|
|
module cache {
|
||
|
|
storagePath ${LSCACHE_ROOT}
|
||
|
|
checkPrivateCache 1
|
||
|
|
checkPublicCache 1
|
||
|
|
maxCacheObjSize 10000000
|
||
|
|
maxStaleAge 200
|
||
|
|
qsCache 1
|
||
|
|
reqCookieCache 1
|
||
|
|
respCookieCache 1
|
||
|
|
ignoreReqCacheCtrl 0
|
||
|
|
ignoreRespCacheCtrl 0
|
||
|
|
enableCache 1
|
||
|
|
enablePrivateCache 1
|
||
|
|
}
|
||
|
|
## ---- end shared-ols server append ----
|