
docRoot                 /home/alhadet/public_html/admin
vhAliases                                     *
listeners               admin.acomma.me-443
adminEmails              cmamedia2016@gmail.Com
enableGzip              1
enableIpGeo             1

index {
  useServer               0
  indexFiles              index.php index.php8 index.php7 index.php5 index.perl index.pl index.plx index.ppl index.cgi index.jsp index.jp index.phtml index.shtml index.xhtml index.html index.htm index.js
  autoIndex               1
}
	
vhssl {
  keyFile                 /var/webuzo/users/alhadet/ssl/admin.acomma.me.key
  certFile               /var/webuzo/users/alhadet/ssl/admin.acomma.me-combined.pem
  certChain               1
  sslProtocol             30
  enableSpdy              15
}	
errorlog /usr/local/lsws/logs/admin.acomma.me.err {
  useServer               0
  logLevel                ERROR
  rollingSize             10M
}

accesslog /usr/local/lsws/logs/admin.acomma.me.log {
  useServer               0
  logFormat               %h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"
  logHeaders              5
  rollingSize             10M
  keepDays                10  
  compressArchive         1
}

errorPage 403 {
  url                     /usr/local/lsws/DEFAULT/html/403.html
}

errorPage 404 {
  url                     /usr/local/lsws/DEFAULT/html/404.html
}

errorPage 500 {
  url                     /usr/local/lsws/DEFAULT/html/500.html
}


rewrite {
  enable                  1
  autoLoadHtaccess       1
  # Prevent redirect loops if already on webmail path
  RewriteCond %{REQUEST_URI} !^/webmail [NC]
   
  # Redirect mail.domain.com to webuzomail
  RewriteCond %{HTTP_HOST} ^mail\.(.*)$
  RewriteRule ^(.*)$ HTTP://webuzomail/mail/$1 [P,L,E=PROXY-HOST:admin.acomma.me]

  RewriteCond %{REQUEST_URI} ^/webmail(\/*)
  RewriteRule ^/(webmail)$ https://admin.acomma.me/$1/ [R=301]
  RewriteRule ^/webmail(\/*)(.*) HTTP://webuzomail/mail/$2 [P,L,E=PROXY-HOST:admin.acomma.me]
  
  
}

scripthandler {
  add                     lsapi:php83 php
}	

extprocessor directus {
  type                    proxy
  address                 127.0.0.1:8055
  maxConns                100
  pcKeepAliveTimeout      60
  initTimeout             60
  retryTimeout            0
  respBuffer              0
}

extprocessor php83 {
  type                    lsapi
  address                 UDS://tmp/lshttpd/php83.sock
  maxConns                10
  env                     PHP_INI_SCAN_DIR=:/home/alhadet/public_html/admin:/home/alhadet/php83
  env                     LSPHP_ENABLE_USER_INI=on
  env                     LSAPI_CHILDREN=10
  initTimeout             600
  retryTimeout            0
  persistConn             1
  pcKeepAliveTimeout      1
  respBuffer              0
  autoStart               2
  path                    /usr/local/apps/php83/bin/lsphp
  memSoftLimit            2047M
  memHardLimit            2047M
  procSoftLimit           400
  procHardLimit           500
}



context / {
  type                    proxy
  handler                 directus
  addDefaultCharset       off
}

context /webuzo {
  type                    redirect
  externalRedirect        0
  statusCode              305
  location                https://admin.acomma.me:2003
}
	
context /cpanel {
  type                    redirect
  externalRedirect        0
  statusCode              305
  location                https://admin.acomma.me:2003
}
	
context /whm {
type                    redirect
externalRedirect        0
statusCode              305
location                https://admin.acomma.me:2005
}




module cache {
  storagePath /usr/local/lsws/cachedata/$VH_NAME
}

include /var/webuzo-data/openlitespeed/custom/users/alhadet.conf
include /var/webuzo-data/openlitespeed/custom/domains/admin.acomma.me.conf
