docroot $VH_ROOT/public_html
vhaliases www.$VH_NAME
enablegzip 1
phpinioverride 
vhdomain $VH_NAME
enableipgeo 1
adminemails admin@tomsjavajive.com

extprocessor tomsj4710 {
    inittimeout 600
    retrytimeout 0
    persistconn 1
    maxconns 10
    type lsapi
    address UDS://tmp/lshttpd/tomsj4710.sock
    extuser tomsj4710
    extgroup tomsj4710
    prochardlimit 500
    pckeepalivetimeout 1
    respbuffer 0
    autostart 1
    path /usr/local/lsws/lsphp85/bin/lsphp
    env LSAPI_CHILDREN=10
    procsoftlimit 400
    memsoftlimit 1024M
    memhardlimit 1024M
}

vhssl  {
    keyfile /etc/letsencrypt/live/tomsjavajive.com/privkey.pem
    certfile /etc/letsencrypt/live/tomsjavajive.com/fullchain.pem
    certchain 1
    enablespdy 15
    enablestapling 1
    ocsprespmaxage 86400
    sslprotocol 24
    enableecdhe 1
    renegprotection 1
    sslsessioncache 1
}

scripthandler  {
    add lsapi:tomsj4710 php
}

module cache {
    param storagepath /usr/local/lsws/cachedata/$VH_NAME
    unknownkeywords storagepath /usr/local/lsws/cachedata/$VH_NAME
}

accesslog $VH_ROOT/logs/$VH_NAME.access_log {
    keepdays 10
    useserver 0
    logformat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i""
    compressarchive 1
    logheaders 5
    rollingsize 10M
}

index  {
    indexfiles index.php, index.html
    useserver 0
}

context /.well-known/acme-challenge {
    phpinioverride 
    adddefaultcharset off
    allowbrowse 1
    location /usr/local/lsws/Example/html/.well-known/acme-challenge

    rewrite  {
        enable 0
    }
}

rewrite  {
    enable 1
    autoloadhtaccess 1
}

errorlog $VH_ROOT/logs/$VH_NAME.error_log {
    rollingsize 10M
    useserver 0
    loglevel WARN
}
