78 lines
2.1 KiB
Smarty
78 lines
2.1 KiB
Smarty
|
|
## Per-vhost config — rendered at container start.
|
||
|
|
## Templated vars (envsubst allow-list): $user $domain
|
||
|
|
## Anything that looks like $DOC_ROOT, $VH_ROOT, $HTTP_HOST etc. is an OLS
|
||
|
|
## runtime macro — intentionally NOT in the envsubst allow-list so it
|
||
|
|
## passes through unchanged for OLS to expand at request time.
|
||
|
|
|
||
|
|
docRoot /home/${user}/public_html
|
||
|
|
|
||
|
|
enableGzip 1
|
||
|
|
enableBr 1
|
||
|
|
|
||
|
|
errorlog /home/${user}/logs/litespeed/error.log {
|
||
|
|
useServer 0
|
||
|
|
logLevel WARN
|
||
|
|
rollingSize 10M
|
||
|
|
keepDays 14
|
||
|
|
compressArchive 1
|
||
|
|
}
|
||
|
|
|
||
|
|
accesslog /home/${user}/logs/litespeed/access.log {
|
||
|
|
useServer 0
|
||
|
|
rollingSize 10M
|
||
|
|
keepDays 7
|
||
|
|
compressArchive 1
|
||
|
|
}
|
||
|
|
|
||
|
|
index {
|
||
|
|
useServer 0
|
||
|
|
indexFiles index.php, index.html
|
||
|
|
autoIndex 0
|
||
|
|
}
|
||
|
|
|
||
|
|
scripthandler {
|
||
|
|
add lsapi:lsphp php
|
||
|
|
}
|
||
|
|
|
||
|
|
## LSCache plugin owns Cache-Control / Expires entirely — keep server-level
|
||
|
|
## expires off so we don't double-emit headers.
|
||
|
|
expires {
|
||
|
|
enableExpires 0
|
||
|
|
}
|
||
|
|
|
||
|
|
accessControl {
|
||
|
|
allow *
|
||
|
|
}
|
||
|
|
|
||
|
|
context / {
|
||
|
|
## $DOC_ROOT is an OLS macro (not a shell var). Don't add it to the
|
||
|
|
## envsubst allow-list in create-vhost-litespeed.sh or it'll expand to
|
||
|
|
## empty and break docroot resolution.
|
||
|
|
location $DOC_ROOT/
|
||
|
|
allowBrowse 1
|
||
|
|
rewrite {
|
||
|
|
enable 1
|
||
|
|
inherit 0
|
||
|
|
autoLoadHtaccess 1
|
||
|
|
RewriteFile .htaccess
|
||
|
|
}
|
||
|
|
addDefaultCharset off
|
||
|
|
}
|
||
|
|
|
||
|
|
rewrite {
|
||
|
|
enable 1
|
||
|
|
autoLoadHtaccess 1
|
||
|
|
logLevel 0
|
||
|
|
}
|
||
|
|
|
||
|
|
## Per-vhost LSCache storage. Server module cache{} block enables the engine;
|
||
|
|
## these lines tell the vhost WHERE to cache. The LSCWP plugin flips the
|
||
|
|
## cache on/off at request time via X-LiteSpeed-Cache-Control headers.
|
||
|
|
module cache {
|
||
|
|
storagePath /home/${user}/lscache
|
||
|
|
checkPrivateCache 1
|
||
|
|
checkPublicCache 1
|
||
|
|
enableCache 0
|
||
|
|
enablePrivateCache 0
|
||
|
|
}
|