virtualHost hostname {
  user                    webapps
  group                   webapps
  vhRoot                  /var/www
  allowSymbolLink         1
  enableScript            1
  restrained              1
  setUIDMode              2
  docRoot                   /var/www/html
  vhDomain                  |HOSTNAME|
  # order: Exact macth first; Then wildMatch; Then the default, which is *
  # having "vhAliases *" is not dangerous, and would just serve the vhost as "default vhost"
  vhAliases					*
  listeners					|IP_LISTENER|-|PORT_80|, |IP_LISTENER|-|PORT_443||LINKEDIP_LISTENERS|
  adminEmails               root@localhost
  enableGzip                1
  enableIpGeo               1

  phpIniOverride  {
    php_admin_value session.save_path '/var/www/tmp'
    php_admin_value  upload_tmp_dir '/var/www/tmp'
  }

  rewrite  {
    enable                  1
    autoLoadHtaccess        1
  }

  vhssl  {
    keyFile                 /usr/local/lsws/ssl.key/server.key
    certFile                /usr/local/lsws/ssl.crt/server.crt.combined
    certChain               1
    sslProtocol             24
    ciphers                 ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
  }

  # logs
  errorlog /var/log/httpd/error_log {
    logLevel             ERROR
    useServer            1
  }

  accesslog /var/log/httpd/access_log {
    logReferer           1
    logUserAgent         1
    logFormat            %a %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i"
    logHeaders           5
    rollingSize          0
  }

  accesslog /var/log/httpd/homedir.log {
    useServer            0
    logFormat            %O %I
    rollingSize          0
  }

  # include aliases
  include /usr/local/lsws/conf/httpd-alias.conf
}
