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

scripthandler  {
    add lsapi:tomto8868 php
}

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

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

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

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

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

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

rewrite  {
    enable 1
    autoloadhtaccess 1
}

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

    rewrite  {
        enable 0
    }
}
