diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1269488 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +data diff --git a/bin/addDomain.sh b/bin/addDomain.sh new file mode 100755 index 0000000..57a6059 --- /dev/null +++ b/bin/addDomain.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +docker-compose exec litespeed su -s /bin/bash lsadm -c "cd /usr/local/lsws/conf && addDomainCtl.sh $1" +[ ! -d "./sites/$1" ] && mkdir -p ./sites/$1/{html,logs} + diff --git a/bin/container/addDomainCtl.sh b/bin/container/addDomainCtl.sh new file mode 100755 index 0000000..3bd1f73 --- /dev/null +++ b/bin/container/addDomainCtl.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +perl -0777 -p -i.bak -e "s/(vhTemplate centralConfigLog \{[^}]+)\}*(^$)/\1 + member $1 { + vhDomain $1 + }/gmi" httpd_config.conf diff --git a/bin/container/rmDomainCtl.sh b/bin/container/rmDomainCtl.sh new file mode 100755 index 0000000..20e9d1e --- /dev/null +++ b/bin/container/rmDomainCtl.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +domain=${1//\./\\.} +#replace . with \. +#so example.com becomes example\.com, this is because in regex . is used for matching any character +#so the regex would match on example.com and example7com, because . matches on "7" +perl -0777 -p -i.bak -e "s/(vhtemplate centralConfigLog \{[^}]+)*(^.*member "$domain" \{.*[^}]*})/\1#thislinewillbedeletedj98311/gmi" httpd_config.conf +perl -i -ne '/#thislinewillbedeletedj98311/ or print' httpd_config.conf +#aboves replaces the matched group with a string and random numbers, then second command searches for that string and deletes the line +#if anyone can figure out how to do above in oneline, feel free to let us know diff --git a/bin/rmDomain.sh b/bin/rmDomain.sh new file mode 100755 index 0000000..2f6bca3 --- /dev/null +++ b/bin/rmDomain.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +docker-compose exec litespeed su -s /bin/bash lsadm -c "cd /usr/local/lsws/conf && rmDomainCtl.sh $1" + diff --git a/conf/httpd_config.conf b/conf/httpd_config.conf new file mode 100644 index 0000000..840716c --- /dev/null +++ b/conf/httpd_config.conf @@ -0,0 +1,254 @@ +# +# PLAIN TEXT CONFIGURATION FILE +# +#It not set, will use host name as serverName +serverName +user nobody +group nogroup +priority 0 +inMemBufSize 60M +swappingDir /tmp/lshttpd/swap +autoFix503 1 +gracefulRestartTimeout 300 +mime conf/mime.properties +showVersionNumber 0 +adminEmails root@localhost + +errorlog logs/error.log { + logLevel DEBUG + debugLevel 0 + rollingSize 10M + enableStderrLog 1 +} + +accesslog logs/access.log { + rollingSize 10M + keepDays 30 + compressArchive 0 +} +indexFiles index.html, index.php + +expires { + enableExpires 1 + expiresByType image/*=A604800,text/css=A604800,application/x-javascript=A604800,application/javascript=A604800,font/*=A604800,application/x-font-ttf=A604800 +} + +tuning { + maxConnections 10000 + maxSSLConnections 10000 + connTimeout 300 + maxKeepAliveReq 10000 + smartKeepAlive 0 + keepAliveTimeout 5 + sndBufSize 0 + rcvBufSize 0 + maxReqURLLen 32768 + maxReqHeaderSize 65536 + maxReqBodySize 2047M + maxDynRespHeaderSize 32768 + maxDynRespSize 2047M + maxCachedFileSize 4096 + totalInMemCacheSize 20M + maxMMapFileSize 256K + totalMMapCacheSize 40M + useSendfile 1 + fileETag 28 + enableGzipCompress 1 + compressibleTypes text/*, application/x-javascript, application/xml, application/javascript, image/svg+xml,application/rss+xml + enableDynGzipCompress 1 + gzipCompressLevel 6 + gzipAutoUpdateStatic 1 + gzipStaticCompressLevel 6 + brStaticCompressLevel 6 + gzipMaxFileSize 10M + gzipMinFileSize 300 + + quicEnable 1 + quicShmDir /dev/shm +} + +fileAccessControl { + followSymbolLink 1 + checkSymbolLink 0 + requiredPermissionMask 000 + restrictedPermissionMask 000 +} + +perClientConnLimit { + staticReqPerSec 0 + dynReqPerSec 0 + outBandwidth 0 + inBandwidth 0 + softLimit 10000 + hardLimit 10000 + gracePeriod 15 + banPeriod 300 +} + +CGIRLimit { + maxCGIInstances 20 + minUID 11 + minGID 10 + priority 0 + CPUSoftLimit 10 + CPUHardLimit 50 + memSoftLimit 1460M + memHardLimit 1470M + procSoftLimit 400 + procHardLimit 450 +} + +accessDenyDir { + dir / + dir /etc/* + dir /dev/* + dir conf/* + dir admin/conf/* +} + +accessControl { + allow ALL +} + +extprocessor lsphp { + type lsapi + address uds://tmp/lshttpd/lsphp.sock + maxConns 10 + env PHP_LSAPI_CHILDREN=10 + env LSAPI_AVOID_FORK=200M + initTimeout 60 + retryTimeout 0 + persistConn 1 + respBuffer 0 + autoStart 1 + path fcgi-bin/lsphp + backlog 100 + instances 1 + priority 0 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 1400 + procHardLimit 1500 +} + +scripthandler { + add lsapi:lsphp php +} + +railsDefaults { + maxConns 1 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +wsgiDefaults { + maxConns 5 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +nodeDefaults { + maxConns 5 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +module cache { + +checkPrivateCache 1 +checkPublicCache 1 +maxCacheObjSize 10000000 +maxStaleAge 200 +qsCache 1 +reqCookieCache 1 +respCookieCache 1 +ignoreReqCacheCtrl 1 +ignoreRespCacheCtrl 0 + +enableCache 0 +expireInSeconds 3600 +enablePrivateCache 0 +privateExpireInSeconds 3600 + ls_enabled 1 +} + +virtualhost Example { + vhRoot Example/ + configFile conf/vhosts/Example/vhconf.conf + allowSymbolLink 1 + enableScript 1 + restrained 1 + setUIDMode 0 +} + +listener Default { + address *:8088 + secure 0 + map Example * +} + +listener HTTP { + address *:80 + secure 0 +} + +vhTemplate centralConfigLog { + templateFile conf/templates/ccl.conf + listeners Default, HTTP + + member example6.com { + vhDomain example6.com + } + + member example5.com { + vhDomain example5.com + } + + member example2.com { + vhDomain example2.com + } + + member example3.com { + vhDomain example3.com + } +} + +vhTemplate EasyRailsWithSuEXEC { + templateFile conf/templates/rails.conf + listeners Default +} + +#include /usr/local/lsws/conf/sites.conf diff --git a/conf/httpd_config.conf.bak b/conf/httpd_config.conf.bak new file mode 100644 index 0000000..f856ac2 --- /dev/null +++ b/conf/httpd_config.conf.bak @@ -0,0 +1,248 @@ +# +# PLAIN TEXT CONFIGURATION FILE +# +#It not set, will use host name as serverName +serverName +user nobody +group nogroup +priority 0 +inMemBufSize 60M +swappingDir /tmp/lshttpd/swap +autoFix503 1 +gracefulRestartTimeout 300 +mime conf/mime.properties +showVersionNumber 0 +adminEmails root@localhost + +errorlog logs/error.log { + logLevel DEBUG + debugLevel 0 + rollingSize 10M + enableStderrLog 1 +} + +accesslog logs/access.log { + rollingSize 10M + keepDays 30 + compressArchive 0 +} +indexFiles index.html, index.php + +expires { + enableExpires 1 + expiresByType image/*=A604800,text/css=A604800,application/x-javascript=A604800,application/javascript=A604800,font/*=A604800,application/x-font-ttf=A604800 +} + +tuning { + maxConnections 10000 + maxSSLConnections 10000 + connTimeout 300 + maxKeepAliveReq 10000 + smartKeepAlive 0 + keepAliveTimeout 5 + sndBufSize 0 + rcvBufSize 0 + maxReqURLLen 32768 + maxReqHeaderSize 65536 + maxReqBodySize 2047M + maxDynRespHeaderSize 32768 + maxDynRespSize 2047M + maxCachedFileSize 4096 + totalInMemCacheSize 20M + maxMMapFileSize 256K + totalMMapCacheSize 40M + useSendfile 1 + fileETag 28 + enableGzipCompress 1 + compressibleTypes text/*, application/x-javascript, application/xml, application/javascript, image/svg+xml,application/rss+xml + enableDynGzipCompress 1 + gzipCompressLevel 6 + gzipAutoUpdateStatic 1 + gzipStaticCompressLevel 6 + brStaticCompressLevel 6 + gzipMaxFileSize 10M + gzipMinFileSize 300 + + quicEnable 1 + quicShmDir /dev/shm +} + +fileAccessControl { + followSymbolLink 1 + checkSymbolLink 0 + requiredPermissionMask 000 + restrictedPermissionMask 000 +} + +perClientConnLimit { + staticReqPerSec 0 + dynReqPerSec 0 + outBandwidth 0 + inBandwidth 0 + softLimit 10000 + hardLimit 10000 + gracePeriod 15 + banPeriod 300 +} + +CGIRLimit { + maxCGIInstances 20 + minUID 11 + minGID 10 + priority 0 + CPUSoftLimit 10 + CPUHardLimit 50 + memSoftLimit 1460M + memHardLimit 1470M + procSoftLimit 400 + procHardLimit 450 +} + +accessDenyDir { + dir / + dir /etc/* + dir /dev/* + dir conf/* + dir admin/conf/* +} + +accessControl { + allow ALL +} + +extprocessor lsphp { + type lsapi + address uds://tmp/lshttpd/lsphp.sock + maxConns 10 + env PHP_LSAPI_CHILDREN=10 + env LSAPI_AVOID_FORK=200M + initTimeout 60 + retryTimeout 0 + persistConn 1 + respBuffer 0 + autoStart 1 + path fcgi-bin/lsphp + backlog 100 + instances 1 + priority 0 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 1400 + procHardLimit 1500 +} + +scripthandler { + add lsapi:lsphp php +} + +railsDefaults { + maxConns 1 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +wsgiDefaults { + maxConns 5 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +nodeDefaults { + maxConns 5 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +module cache { + +checkPrivateCache 1 +checkPublicCache 1 +maxCacheObjSize 10000000 +maxStaleAge 200 +qsCache 1 +reqCookieCache 1 +respCookieCache 1 +ignoreReqCacheCtrl 1 +ignoreRespCacheCtrl 0 + +enableCache 0 +expireInSeconds 3600 +enablePrivateCache 0 +privateExpireInSeconds 3600 + ls_enabled 1 +} + +virtualhost Example { + vhRoot Example/ + configFile conf/vhosts/Example/vhconf.conf + allowSymbolLink 1 + enableScript 1 + restrained 1 + setUIDMode 0 +} + +listener Default { + address *:8088 + secure 0 + map Example * +} + +listener HTTP { + address *:80 + secure 0 +} + +vhTemplate centralConfigLog { + templateFile conf/templates/ccl.conf + listeners Default, HTTP + + member example6.com { + vhDomain example6.com + } + member example5.com { + vhDomain example5.com + } + member example2.com { + vhDomain example2.com + } +} + +vhTemplate EasyRailsWithSuEXEC { + templateFile conf/templates/rails.conf + listeners Default +} + +#include /usr/local/lsws/conf/sites.conf diff --git a/conf/httpd_config.conf0 b/conf/httpd_config.conf0 new file mode 100644 index 0000000..f856ac2 --- /dev/null +++ b/conf/httpd_config.conf0 @@ -0,0 +1,248 @@ +# +# PLAIN TEXT CONFIGURATION FILE +# +#It not set, will use host name as serverName +serverName +user nobody +group nogroup +priority 0 +inMemBufSize 60M +swappingDir /tmp/lshttpd/swap +autoFix503 1 +gracefulRestartTimeout 300 +mime conf/mime.properties +showVersionNumber 0 +adminEmails root@localhost + +errorlog logs/error.log { + logLevel DEBUG + debugLevel 0 + rollingSize 10M + enableStderrLog 1 +} + +accesslog logs/access.log { + rollingSize 10M + keepDays 30 + compressArchive 0 +} +indexFiles index.html, index.php + +expires { + enableExpires 1 + expiresByType image/*=A604800,text/css=A604800,application/x-javascript=A604800,application/javascript=A604800,font/*=A604800,application/x-font-ttf=A604800 +} + +tuning { + maxConnections 10000 + maxSSLConnections 10000 + connTimeout 300 + maxKeepAliveReq 10000 + smartKeepAlive 0 + keepAliveTimeout 5 + sndBufSize 0 + rcvBufSize 0 + maxReqURLLen 32768 + maxReqHeaderSize 65536 + maxReqBodySize 2047M + maxDynRespHeaderSize 32768 + maxDynRespSize 2047M + maxCachedFileSize 4096 + totalInMemCacheSize 20M + maxMMapFileSize 256K + totalMMapCacheSize 40M + useSendfile 1 + fileETag 28 + enableGzipCompress 1 + compressibleTypes text/*, application/x-javascript, application/xml, application/javascript, image/svg+xml,application/rss+xml + enableDynGzipCompress 1 + gzipCompressLevel 6 + gzipAutoUpdateStatic 1 + gzipStaticCompressLevel 6 + brStaticCompressLevel 6 + gzipMaxFileSize 10M + gzipMinFileSize 300 + + quicEnable 1 + quicShmDir /dev/shm +} + +fileAccessControl { + followSymbolLink 1 + checkSymbolLink 0 + requiredPermissionMask 000 + restrictedPermissionMask 000 +} + +perClientConnLimit { + staticReqPerSec 0 + dynReqPerSec 0 + outBandwidth 0 + inBandwidth 0 + softLimit 10000 + hardLimit 10000 + gracePeriod 15 + banPeriod 300 +} + +CGIRLimit { + maxCGIInstances 20 + minUID 11 + minGID 10 + priority 0 + CPUSoftLimit 10 + CPUHardLimit 50 + memSoftLimit 1460M + memHardLimit 1470M + procSoftLimit 400 + procHardLimit 450 +} + +accessDenyDir { + dir / + dir /etc/* + dir /dev/* + dir conf/* + dir admin/conf/* +} + +accessControl { + allow ALL +} + +extprocessor lsphp { + type lsapi + address uds://tmp/lshttpd/lsphp.sock + maxConns 10 + env PHP_LSAPI_CHILDREN=10 + env LSAPI_AVOID_FORK=200M + initTimeout 60 + retryTimeout 0 + persistConn 1 + respBuffer 0 + autoStart 1 + path fcgi-bin/lsphp + backlog 100 + instances 1 + priority 0 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 1400 + procHardLimit 1500 +} + +scripthandler { + add lsapi:lsphp php +} + +railsDefaults { + maxConns 1 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +wsgiDefaults { + maxConns 5 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +nodeDefaults { + maxConns 5 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +module cache { + +checkPrivateCache 1 +checkPublicCache 1 +maxCacheObjSize 10000000 +maxStaleAge 200 +qsCache 1 +reqCookieCache 1 +respCookieCache 1 +ignoreReqCacheCtrl 1 +ignoreRespCacheCtrl 0 + +enableCache 0 +expireInSeconds 3600 +enablePrivateCache 0 +privateExpireInSeconds 3600 + ls_enabled 1 +} + +virtualhost Example { + vhRoot Example/ + configFile conf/vhosts/Example/vhconf.conf + allowSymbolLink 1 + enableScript 1 + restrained 1 + setUIDMode 0 +} + +listener Default { + address *:8088 + secure 0 + map Example * +} + +listener HTTP { + address *:80 + secure 0 +} + +vhTemplate centralConfigLog { + templateFile conf/templates/ccl.conf + listeners Default, HTTP + + member example6.com { + vhDomain example6.com + } + member example5.com { + vhDomain example5.com + } + member example2.com { + vhDomain example2.com + } +} + +vhTemplate EasyRailsWithSuEXEC { + templateFile conf/templates/rails.conf + listeners Default +} + +#include /usr/local/lsws/conf/sites.conf diff --git a/conf/mime.properties b/conf/mime.properties new file mode 100755 index 0000000..fa55ee8 --- /dev/null +++ b/conf/mime.properties @@ -0,0 +1,162 @@ +default = application/octet-stream +3gp = video/3gpp +3g2 = video/3gpp2 +ai, eps = application/postscript +aif, aifc, aiff = audio/x-aiff +asc = text/plain +asf = video/asf +asx = video/x-ms-asf +au = audio/basic +avi = video/x-msvideo +bcpio = application/x-bcpio +bmp = image/bmp +bin = application/octet-stream +bz, bz2 = application/x-bzip +cdf = application/x-netcdf +class = application/java-vm +cpio = application/x-cpio +cpt = application/mac-compactpro +crt = application/x-x509-ca-cert +csh = application/x-csh +css = text/css +dcr,dir, dxr = application/x-director +dms = application/octet-stream +doc = application/msword +dtd = application/xml-dtd +dvi = application/x-dvi +eot = application/vnd.ms-fontobject +etx = text/x-setext +exe = application/x-executable +ez = application/andrew-inset +flv = video/x-flv +gif = image/gif +gtar = application/x-gtar +gz, gzip = application/gzip +hdf = application/x-hdf +hqx = application/mac-binhex40 +htc = text/x-component +html, htm = text/html +ice = x-conference/x-cooltalk +ico = image/x-icon +ief = image/ief +iges, igs = model/iges +iso = application/x-cd-image +java = text/plain +jar = application/java-archive +jnlp = application/x-java-jnlp-file +jpeg, jpe, jpg = image/jpeg +js = application/x-javascript +js2 = application/javascript +js3 = text/javascript +json = application/json +jsp = text/plain +kar = audio/midi +latex = application/x-latex +lha, lzh = application/octet-stream +man = application/x-troff-man +mdb = application/vnd.ms-access +me = application/x-troff-me +mesh = model/mesh +mid, midi = audio/midi +mif = application/vnd.mif +movie = video/x-sgi-movie +mov = video/quicktime +mp2, mp3, mpga = audio/mpeg +mpeg, mpe, mpg = video/mpeg +mp4 = video/mp4 +mpp = application/vnd.ms-project +ms = application/x-troff-ms +msh = model/mesh +nc = application/x-netcdf +oda = application/oda +odb = application/vnd.oasis.opendocument.database +odc = application/vnd.oasis.opendocument.chart +odf = application/vnd.oasis.opendocument.formula +odg = application/vnd.oasis.opendocument.graphics +odi = application/vnd.oasis.opendocument.image +odp = application/vnd.oasis.opendocument.presentation +ods = application/vnd.oasis.opendocument.spreadsheet +odt = application/vnd.oasis.opendocument.text +ogg = audio/ogg +otf = application/x-font-woff +pbm = image/x-portable-bitmap +pdb = chemical/x-pdb +pdf = application/pdf +pgm = image/x-portable-graymap +pgn = application/x-chess-pgn +pls = audio/x-scpls +png = image/png +pnm = image/x-portable-anymap +ppm = image/x-portable-pixmap +ppt = application/vnd.ms-powerpoint +ps = application/postscript +qt,qtvr = video/quicktime +ra = audio/x-realaudio +ram, rm = audio/x-pn-realaudio +rar = application/x-rar-compressed +ras = image/x-cmu-raster +rgb = image/x-rgb +roff, t, tr = application/x-troff +rss = application/rss+xml +rsd = application/rsd+xml +rtf = application/rtf +rtx = text/richtext +ser = application/java-serialized-object +sgml, sgm = text/sgml +sh = application/x-sh +shar = application/x-shar +shtml = application/x-httpd-shtml +silo = model/mesh +sit = application/x-stuffit +skd, skm, skp, skt = application/x-koan +smi,smil = application/smil +snd = audio/basic +spl = application/x-futuresplash +sql = text/x-sql +src = application/x-wais-source +sv4cpio = application/x-sv4cpio +sv4crc = application/x-sv4crc +svg, svgz = image/svg+xml +swf = application/x-shockwave-flash +tar = application/x-tar +tcl = application/x-tcl +tex = application/x-tex +texi, texinfo = application/x-texinfo +tgz = application/x-gtar +tiff, tif = image/tiff +tsv = text/tab-separated-values +ttf, ttc = application/x-font-ttf +txt = text/plain +ustar = application/x-ustar +vcd = application/x-cdlink +vrml = model/vrml +vxml = application/voicexml+xml +wav = audio/vnd.wave +wax = audio/x-ms-wax +wbmp = image/vnd.wap.wbmp +webp = image/webp +wma = audio/x-ms-wma +wml = text/vnd.wap.wml +wmlc = application/vnd.wap.wmlc +wmls = text/vnd.wap.wmlscript +wmlsc = application/vnd.wap.wmlscriptc +woff = application/font-woff +woff2 = font/woff2 +woff3 = font/woff +woff4 = application/font-woff2 +ttf2 = font/ttf +woff_o1 = application/x-font-woff +wtls-ca-certificate = application/vnd.wap.wtls-ca-certificate +wri = application/vnd.ms-write +wrl = model/vrml +xbm = image/x-xbitmap +xhtml, xht = application/xhtml+xml +xls = application/vnd.ms-excel +xml, xsd, xsl = application/xml +xml2 = text/xml +xslt = application/xslt+xml +xpm = image/x-xpixmap +xwd = image/x-xwindowdump +xyz = chemical/x-pdb +zip = application/zip +z = application/compress diff --git a/conf/mime.properties0 b/conf/mime.properties0 new file mode 100755 index 0000000..fa55ee8 --- /dev/null +++ b/conf/mime.properties0 @@ -0,0 +1,162 @@ +default = application/octet-stream +3gp = video/3gpp +3g2 = video/3gpp2 +ai, eps = application/postscript +aif, aifc, aiff = audio/x-aiff +asc = text/plain +asf = video/asf +asx = video/x-ms-asf +au = audio/basic +avi = video/x-msvideo +bcpio = application/x-bcpio +bmp = image/bmp +bin = application/octet-stream +bz, bz2 = application/x-bzip +cdf = application/x-netcdf +class = application/java-vm +cpio = application/x-cpio +cpt = application/mac-compactpro +crt = application/x-x509-ca-cert +csh = application/x-csh +css = text/css +dcr,dir, dxr = application/x-director +dms = application/octet-stream +doc = application/msword +dtd = application/xml-dtd +dvi = application/x-dvi +eot = application/vnd.ms-fontobject +etx = text/x-setext +exe = application/x-executable +ez = application/andrew-inset +flv = video/x-flv +gif = image/gif +gtar = application/x-gtar +gz, gzip = application/gzip +hdf = application/x-hdf +hqx = application/mac-binhex40 +htc = text/x-component +html, htm = text/html +ice = x-conference/x-cooltalk +ico = image/x-icon +ief = image/ief +iges, igs = model/iges +iso = application/x-cd-image +java = text/plain +jar = application/java-archive +jnlp = application/x-java-jnlp-file +jpeg, jpe, jpg = image/jpeg +js = application/x-javascript +js2 = application/javascript +js3 = text/javascript +json = application/json +jsp = text/plain +kar = audio/midi +latex = application/x-latex +lha, lzh = application/octet-stream +man = application/x-troff-man +mdb = application/vnd.ms-access +me = application/x-troff-me +mesh = model/mesh +mid, midi = audio/midi +mif = application/vnd.mif +movie = video/x-sgi-movie +mov = video/quicktime +mp2, mp3, mpga = audio/mpeg +mpeg, mpe, mpg = video/mpeg +mp4 = video/mp4 +mpp = application/vnd.ms-project +ms = application/x-troff-ms +msh = model/mesh +nc = application/x-netcdf +oda = application/oda +odb = application/vnd.oasis.opendocument.database +odc = application/vnd.oasis.opendocument.chart +odf = application/vnd.oasis.opendocument.formula +odg = application/vnd.oasis.opendocument.graphics +odi = application/vnd.oasis.opendocument.image +odp = application/vnd.oasis.opendocument.presentation +ods = application/vnd.oasis.opendocument.spreadsheet +odt = application/vnd.oasis.opendocument.text +ogg = audio/ogg +otf = application/x-font-woff +pbm = image/x-portable-bitmap +pdb = chemical/x-pdb +pdf = application/pdf +pgm = image/x-portable-graymap +pgn = application/x-chess-pgn +pls = audio/x-scpls +png = image/png +pnm = image/x-portable-anymap +ppm = image/x-portable-pixmap +ppt = application/vnd.ms-powerpoint +ps = application/postscript +qt,qtvr = video/quicktime +ra = audio/x-realaudio +ram, rm = audio/x-pn-realaudio +rar = application/x-rar-compressed +ras = image/x-cmu-raster +rgb = image/x-rgb +roff, t, tr = application/x-troff +rss = application/rss+xml +rsd = application/rsd+xml +rtf = application/rtf +rtx = text/richtext +ser = application/java-serialized-object +sgml, sgm = text/sgml +sh = application/x-sh +shar = application/x-shar +shtml = application/x-httpd-shtml +silo = model/mesh +sit = application/x-stuffit +skd, skm, skp, skt = application/x-koan +smi,smil = application/smil +snd = audio/basic +spl = application/x-futuresplash +sql = text/x-sql +src = application/x-wais-source +sv4cpio = application/x-sv4cpio +sv4crc = application/x-sv4crc +svg, svgz = image/svg+xml +swf = application/x-shockwave-flash +tar = application/x-tar +tcl = application/x-tcl +tex = application/x-tex +texi, texinfo = application/x-texinfo +tgz = application/x-gtar +tiff, tif = image/tiff +tsv = text/tab-separated-values +ttf, ttc = application/x-font-ttf +txt = text/plain +ustar = application/x-ustar +vcd = application/x-cdlink +vrml = model/vrml +vxml = application/voicexml+xml +wav = audio/vnd.wave +wax = audio/x-ms-wax +wbmp = image/vnd.wap.wbmp +webp = image/webp +wma = audio/x-ms-wma +wml = text/vnd.wap.wml +wmlc = application/vnd.wap.wmlc +wmls = text/vnd.wap.wmlscript +wmlsc = application/vnd.wap.wmlscriptc +woff = application/font-woff +woff2 = font/woff2 +woff3 = font/woff +woff4 = application/font-woff2 +ttf2 = font/ttf +woff_o1 = application/x-font-woff +wtls-ca-certificate = application/vnd.wap.wtls-ca-certificate +wri = application/vnd.ms-write +wrl = model/vrml +xbm = image/x-xbitmap +xhtml, xht = application/xhtml+xml +xls = application/vnd.ms-excel +xml, xsd, xsl = application/xml +xml2 = text/xml +xslt = application/xslt+xml +xpm = image/x-xpixmap +xwd = image/x-xwindowdump +xyz = chemical/x-pdb +zip = application/zip +z = application/compress diff --git a/conf/templates/ccl.conf b/conf/templates/ccl.conf new file mode 100644 index 0000000..3a32386 --- /dev/null +++ b/conf/templates/ccl.conf @@ -0,0 +1,57 @@ +vhRoot /var/www/vhosts/$VH_NAME/ +configFile $SERVER_ROOT/conf/vhosts/$VH_NAME/vhconf.conf +allowSymbolLink 1 +enableScript 1 +restrained 1 +setUIDMode 2 + +virtualHostConfig { + docRoot $VH_ROOT/html/ + enableGzip 1 + + errorlog { + useServer 1 + } + + accesslog $SERVER_ROOT/logs/$VH_NAME.access.log { + useServer 0 + rollingSize 100M + keepDays 30 + compressArchive 1 + } + + index { + useServer 0 + indexFiles index.html, index.php + autoIndex 0 + autoIndexURI /_autoindex/default.php + } + + expires { + enableExpires 1 + } + + accessControl { + allow * + } + + context /cgi-bin/ { + type cgi + location $VH_ROOT/cgi-bin/ + } + + context / { + location $DOC_ROOT/ + allowBrowse 1 + + rewrite { +RewriteFile .htaccess + } + } + + rewrite { + enable 0 + logLevel 0 + } +} + diff --git a/conf/templates/ccl.conf.bak b/conf/templates/ccl.conf.bak new file mode 100644 index 0000000..07d13b5 --- /dev/null +++ b/conf/templates/ccl.conf.bak @@ -0,0 +1,57 @@ +vhRoot /var/www/vhosts/$VH_NAME/ +configFile $SERVER_ROOT/conf/vhosts/$VH_NAME/vhconf.conf +allowSymbolLink 1 +enableScript 1 +restrained 1 +setUIDMode 0 + +virtualHostConfig { + docRoot $VH_ROOT/html/ + enableGzip 1 + + errorlog { + useServer 1 + } + + accesslog $SERVER_ROOT/logs/$VH_NAME.access.log { + useServer 0 + rollingSize 100M + keepDays 30 + compressArchive 1 + } + + index { + useServer 0 + indexFiles index.html, index.php + autoIndex 0 + autoIndexURI /_autoindex/default.php + } + + expires { + enableExpires 1 + } + + accessControl { + allow * + } + + context /cgi-bin/ { + type cgi + location $VH_ROOT/cgi-bin/ + } + + context / { + location $DOC_ROOT/ + allowBrowse 1 + + rewrite { +RewriteFile .htaccess + } + } + + rewrite { + enable 0 + logLevel 0 + } +} + diff --git a/conf/templates/ccl.conf0 b/conf/templates/ccl.conf0 new file mode 100755 index 0000000..07d13b5 --- /dev/null +++ b/conf/templates/ccl.conf0 @@ -0,0 +1,57 @@ +vhRoot /var/www/vhosts/$VH_NAME/ +configFile $SERVER_ROOT/conf/vhosts/$VH_NAME/vhconf.conf +allowSymbolLink 1 +enableScript 1 +restrained 1 +setUIDMode 0 + +virtualHostConfig { + docRoot $VH_ROOT/html/ + enableGzip 1 + + errorlog { + useServer 1 + } + + accesslog $SERVER_ROOT/logs/$VH_NAME.access.log { + useServer 0 + rollingSize 100M + keepDays 30 + compressArchive 1 + } + + index { + useServer 0 + indexFiles index.html, index.php + autoIndex 0 + autoIndexURI /_autoindex/default.php + } + + expires { + enableExpires 1 + } + + accessControl { + allow * + } + + context /cgi-bin/ { + type cgi + location $VH_ROOT/cgi-bin/ + } + + context / { + location $DOC_ROOT/ + allowBrowse 1 + + rewrite { +RewriteFile .htaccess + } + } + + rewrite { + enable 0 + logLevel 0 + } +} + diff --git a/conf/templates/rails.conf b/conf/templates/rails.conf new file mode 100755 index 0000000..e6a2fd3 --- /dev/null +++ b/conf/templates/rails.conf @@ -0,0 +1,74 @@ +allowSymbolLink 1 +chrootMode 0 +enableScript 1 +restrained 1 +setUIDMode 2 +vhRoot $SERVER_ROOT/$VH_NAME/ +configFile $SERVER_ROOT/conf/vhosts/$VH_NAME/vhconf.conf + +virtualHostConfig { + enableGzip 1 + docRoot $VH_ROOT/public/ + + accessControl { + allow * + } + + hotlinkCtrl { + suffixes gif, jpeg, jpg + allowDirectAccess 1 + onlySelf 1 + enableHotlinkCtrl 0 + } + + rewrite { + enable 0 + logLevel 0 + } + + index { + useServer 0 + autoIndex 0 + indexFiles index.html + autoIndexURI /_autoindex/default.php + } + + accessLog $SERVER_ROOT/logs/$VH_NAME.access.log{ + logHeaders 3 + compressArchive 0 + useServer 0 + keepDays 30 + rollingSize 500M + } + + errorlog { + useServer 1 + } + + context / { + railsEnv 1 + maxConns 5 + location $VH_ROOT/ + type rails + accessControl + addDefaultCharset off + rewrite { + RewriteFile .htaccess + } + } + + expires { + enableExpires 1 + } + + awstats { + workingDir $VH_ROOT/awstats + awstatsURI /awstats/ + siteDomain localhost + siteAliases 127.0.0.1 localhost + updateMode 0 + updateInterval 86400 + updateOffset 0 + securedConn 0 + } +} diff --git a/conf/templates/rails.conf0 b/conf/templates/rails.conf0 new file mode 100755 index 0000000..e6a2fd3 --- /dev/null +++ b/conf/templates/rails.conf0 @@ -0,0 +1,74 @@ +allowSymbolLink 1 +chrootMode 0 +enableScript 1 +restrained 1 +setUIDMode 2 +vhRoot $SERVER_ROOT/$VH_NAME/ +configFile $SERVER_ROOT/conf/vhosts/$VH_NAME/vhconf.conf + +virtualHostConfig { + enableGzip 1 + docRoot $VH_ROOT/public/ + + accessControl { + allow * + } + + hotlinkCtrl { + suffixes gif, jpeg, jpg + allowDirectAccess 1 + onlySelf 1 + enableHotlinkCtrl 0 + } + + rewrite { + enable 0 + logLevel 0 + } + + index { + useServer 0 + autoIndex 0 + indexFiles index.html + autoIndexURI /_autoindex/default.php + } + + accessLog $SERVER_ROOT/logs/$VH_NAME.access.log{ + logHeaders 3 + compressArchive 0 + useServer 0 + keepDays 30 + rollingSize 500M + } + + errorlog { + useServer 1 + } + + context / { + railsEnv 1 + maxConns 5 + location $VH_ROOT/ + type rails + accessControl + addDefaultCharset off + rewrite { + RewriteFile .htaccess + } + } + + expires { + enableExpires 1 + } + + awstats { + workingDir $VH_ROOT/awstats + awstatsURI /awstats/ + siteDomain localhost + siteAliases 127.0.0.1 localhost + updateMode 0 + updateInterval 86400 + updateOffset 0 + securedConn 0 + } +} diff --git a/conf/vhosts/Example/htgroup b/conf/vhosts/Example/htgroup new file mode 100755 index 0000000..5f9c0c8 --- /dev/null +++ b/conf/vhosts/Example/htgroup @@ -0,0 +1,4 @@ +group1: user1,user2, user3 +group2: +user: user8, test +group3: diff --git a/conf/vhosts/Example/htpasswd b/conf/vhosts/Example/htpasswd new file mode 100755 index 0000000..2b90853 --- /dev/null +++ b/conf/vhosts/Example/htpasswd @@ -0,0 +1,2 @@ +test:kF2EDBE2Ux8sQ +user1:SQtevcsBBnBPY diff --git a/conf/vhosts/Example/vhconf.conf b/conf/vhosts/Example/vhconf.conf new file mode 100644 index 0000000..8baa338 --- /dev/null +++ b/conf/vhosts/Example/vhconf.conf @@ -0,0 +1,115 @@ +docRoot $VH_ROOT/html/ +enableGzip 1 + + +context / { + allowBrowse 1 + location $DOC_ROOT/ + rewrite { + RewriteFile .htaccess + } +} + +context /docs/{ + allowBrowse 1 + location $SERVER_ROOT/docs/ +} + +context /protected/{ + required user test + authName Protected + allowBrowse 1 + location protected/ + realm SampleProtectedArea + + accessControl { + deny + allow * + } +} + +context /blocked/{ + allowBrowse 0 +} + +context /cgi-bin/{ + allowBrowse 1 + location $VH_ROOT/cgi-bin/ + type cgi +} + +expires { + enableExpires 1 +} + +index { + autoIndexURI /_autoindex/default.php + indexFiles index.html + autoIndex 0 + useServer 0 +} + +errorPage 404{ + url /error404.html +} + +errorlog $VH_ROOT/logs/error.log{ + logLevel DEBUG + rollingSize 10M + useServer 1 +} + +accessLog $VH_ROOT/logs/access.log{ + compressArchive 0 + logReferer 1 + keepDays 30 + rollingSize 10M + logUserAgent 1 + useServer 0 +} + +awstats { + updateInterval 86400 + workingDir $VH_ROOT/awstats + updateOffset 0 + siteDomain localhost + siteAliases 127.0.0.1 localhost + updateMode 0 + awstatsURI /awstats/ +} + +rewrite { + enable 0 + logLevel 0 +} + +hotlinkCtrl { + suffixes gif, jpeg, jpg + allowedHosts + allowDirectAccess 1 + enableHotlinkCtrl 0 + onlySelf 1 +} + +accessControl { + deny + allow * +} + +realm SampleProtectedArea { + userDB { + cacheTimeout 60 + maxCacheSize 200 + location conf/vhosts/Example/htpasswd + } + + groupDB { + cacheTimeout 60 + maxCacheSize 200 + location conf/vhosts/Example/htgroup + } +} + +general { + enableContextAC 0 +} diff --git a/conf/vhosts/Example/vhconf.conf0 b/conf/vhosts/Example/vhconf.conf0 new file mode 100644 index 0000000..8baa338 --- /dev/null +++ b/conf/vhosts/Example/vhconf.conf0 @@ -0,0 +1,115 @@ +docRoot $VH_ROOT/html/ +enableGzip 1 + + +context / { + allowBrowse 1 + location $DOC_ROOT/ + rewrite { + RewriteFile .htaccess + } +} + +context /docs/{ + allowBrowse 1 + location $SERVER_ROOT/docs/ +} + +context /protected/{ + required user test + authName Protected + allowBrowse 1 + location protected/ + realm SampleProtectedArea + + accessControl { + deny + allow * + } +} + +context /blocked/{ + allowBrowse 0 +} + +context /cgi-bin/{ + allowBrowse 1 + location $VH_ROOT/cgi-bin/ + type cgi +} + +expires { + enableExpires 1 +} + +index { + autoIndexURI /_autoindex/default.php + indexFiles index.html + autoIndex 0 + useServer 0 +} + +errorPage 404{ + url /error404.html +} + +errorlog $VH_ROOT/logs/error.log{ + logLevel DEBUG + rollingSize 10M + useServer 1 +} + +accessLog $VH_ROOT/logs/access.log{ + compressArchive 0 + logReferer 1 + keepDays 30 + rollingSize 10M + logUserAgent 1 + useServer 0 +} + +awstats { + updateInterval 86400 + workingDir $VH_ROOT/awstats + updateOffset 0 + siteDomain localhost + siteAliases 127.0.0.1 localhost + updateMode 0 + awstatsURI /awstats/ +} + +rewrite { + enable 0 + logLevel 0 +} + +hotlinkCtrl { + suffixes gif, jpeg, jpg + allowedHosts + allowDirectAccess 1 + enableHotlinkCtrl 0 + onlySelf 1 +} + +accessControl { + deny + allow * +} + +realm SampleProtectedArea { + userDB { + cacheTimeout 60 + maxCacheSize 200 + location conf/vhosts/Example/htpasswd + } + + groupDB { + cacheTimeout 60 + maxCacheSize 200 + location conf/vhosts/Example/htgroup + } +} + +general { + enableContextAC 0 +} diff --git a/config/litespeed/1.6.4.lh/Dockerfile b/config/litespeed/1.6.4.lh/Dockerfile new file mode 100644 index 0000000..946d5e8 --- /dev/null +++ b/config/litespeed/1.6.4.lh/Dockerfile @@ -0,0 +1,29 @@ +#FROM debian:jessie-slim +FROM ubuntu:18.04 + +RUN apt-get update && apt-get install wget curl -y + +RUN wget https://openlitespeed.org/preuse/openlitespeed-1.6.4.tgz && \ + tar xzvf openlitespeed-1.6.4.tgz && cd openlitespeed && ./install.sh && rm -rf /openlitespeed + +RUN apt-get install mysql-client lsphp73 lsphp73-mysql lsphp73-opcache lsphp73-curl lsphp73-json -y + +#RUN echo "admin:$(/usr/local/lsws/admin/fcgi-bin/admin_php* -q /usr/local/lsws/admin/misc/htpasswd.php ${WEB_ADMIN_PASSWORD})" \ +# > /usr/local/lsws/admin/conf/htpasswd + +EXPOSE 7080 + +RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && \ + chmod +x wp-cli.phar && mv wp-cli.phar /usr/local/bin/wp && \ + ln -s /usr/local/lsws/lsphp73/bin/php7.3 /usr/bin/php + + +RUN rm -rf /usr/local/lsws/conf +ADD conf /usr/local/lsws/conf +RUN chown 999:999 /usr/local/lsws/conf -R +COPY entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/entrypoint.sh"] +WORKDIR /var/www/html/ +CMD ["/usr/local/lsws/bin/openlitespeed","-n"] + diff --git a/config/litespeed/1.6.4.lh/conf.bak/.DS_Store b/config/litespeed/1.6.4.lh/conf.bak/.DS_Store new file mode 100644 index 0000000..306c06e Binary files /dev/null and b/config/litespeed/1.6.4.lh/conf.bak/.DS_Store differ diff --git a/config/litespeed/1.6.4.lh/conf.bak/httpd_config.conf b/config/litespeed/1.6.4.lh/conf.bak/httpd_config.conf new file mode 100644 index 0000000..9ffbcba --- /dev/null +++ b/config/litespeed/1.6.4.lh/conf.bak/httpd_config.conf @@ -0,0 +1,236 @@ +# +# PLAIN TEXT CONFIGURATION FILE +# +#It not set, will use host name as serverName +serverName +user nobody +group nogroup +priority 0 +inMemBufSize 60M +swappingDir /tmp/lshttpd/swap +autoFix503 1 +gracefulRestartTimeout 300 +mime conf/mime.properties +showVersionNumber 0 +adminEmails root@localhost + +errorlog logs/error.log { + logLevel DEBUG + debugLevel 0 + rollingSize 10M + enableStderrLog 1 +} + +accesslog logs/access.log { + rollingSize 10M + keepDays 30 + compressArchive 0 +} +indexFiles index.html, index.php + +expires { + enableExpires 1 + expiresByType image/*=A604800,text/css=A604800,application/x-javascript=A604800,application/javascript=A604800,font/*=A604800,application/x-font-ttf=A604800 +} +autoLoadHtaccess 1 + +tuning { + maxConnections 10000 + maxSSLConnections 10000 + connTimeout 300 + maxKeepAliveReq 10000 + keepAliveTimeout 5 + sndBufSize 0 + rcvBufSize 0 + maxReqURLLen 32768 + maxReqHeaderSize 65536 + maxReqBodySize 2047M + maxDynRespHeaderSize 32768 + maxDynRespSize 2047M + maxCachedFileSize 4096 + totalInMemCacheSize 20M + maxMMapFileSize 256K + totalMMapCacheSize 40M + useSendfile 1 + fileETag 28 + enableGzipCompress 1 + compressibleTypes text/*, application/x-javascript, application/xml, application/javascript, image/svg+xml,application/rss+xml + enableDynGzipCompress 1 + gzipCompressLevel 6 + gzipAutoUpdateStatic 1 + gzipStaticCompressLevel 6 + brStaticCompressLevel 6 + gzipMaxFileSize 10M + gzipMinFileSize 300 +} + +fileAccessControl { + followSymbolLink 1 + checkSymbolLink 0 + requiredPermissionMask 000 + restrictedPermissionMask 000 +} + +perClientConnLimit { + staticReqPerSec 0 + dynReqPerSec 0 + outBandwidth 0 + inBandwidth 0 + softLimit 10000 + hardLimit 10000 + gracePeriod 15 + banPeriod 300 +} + +CGIRLimit { + maxCGIInstances 20 + minUID 11 + minGID 10 + priority 0 + CPUSoftLimit 10 + CPUHardLimit 50 + memSoftLimit 1460M + memHardLimit 1470M + procSoftLimit 400 + procHardLimit 450 +} + +accessDenyDir { + dir / + dir /etc/* + dir /dev/* + dir conf/* + dir admin/conf/* +} + +accessControl { + allow ALL +} + +extprocessor lsphp { + type lsapi + address uds://tmp/lshttpd/lsphp.sock + maxConns 35 + env PHP_LSAPI_CHILDREN=35 + env LSAPI_AVOID_FORK=200M + initTimeout 60 + retryTimeout 0 + persistConn 1 + respBuffer 0 + autoStart 2 + path fcgi-bin/lsphp + backlog 100 + instances 1 + priority 0 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 1400 + procHardLimit 1500 +} + +scripthandler { + add lsapi:lsphp php +} + +railsDefaults { + maxConns 1 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +wsgiDefaults { + maxConns 5 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +nodeDefaults { + maxConns 5 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +module cache { + +checkPrivateCache 1 +checkPublicCache 1 +maxCacheObjSize 10000000 +maxStaleAge 200 +qsCache 1 +reqCookieCache 1 +respCookieCache 1 +ignoreReqCacheCtrl 1 +ignoreRespCacheCtrl 0 + +enableCache 0 +expireInSeconds 3600 +enablePrivateCache 0 +privateExpireInSeconds 3600 + ls_enabled 1 +} + +virtualhost Example { + vhRoot Example/ + configFile conf/vhosts/Example/vhconf.conf + allowSymbolLink 1 + enableScript 1 + restrained 1 + setUIDMode 0 +} + +listener HTTP { + address *:80 + secure 0 + map Example * +} + +listener HTTPS { + address *:443 + secure 1 + keyFile /usr/local/lsws/admin/conf/webadmin.key + certFile /usr/local/lsws/admin/conf/webadmin.crt + map Example * +} + +vhTemplate centralConfigLog { + templateFile conf/templates/ccl.conf + listeners HTTP +} + +vhTemplate EasyRailsWithSuEXEC { + templateFile conf/templates/rails.conf + listeners HTTP +} diff --git a/config/litespeed/1.6.4.lh/conf.bak/httpd_config.conf.bak b/config/litespeed/1.6.4.lh/conf.bak/httpd_config.conf.bak new file mode 100644 index 0000000..91533a5 --- /dev/null +++ b/config/litespeed/1.6.4.lh/conf.bak/httpd_config.conf.bak @@ -0,0 +1,250 @@ +# +# PLAIN TEXT CONFIGURATION FILE +# + +#It not set, will use host name as serverName +serverName +user nobody +group nogroup +priority 0 +autoRestart 1 +chrootPath / +enableChroot 0 +inMemBufSize 60M +swappingDir /tmp/lshttpd/swap +autoFix503 1 +gracefulRestartTimeout 300 +mime conf/mime.properties +showVersionNumber 0 +adminEmails root@localhost +indexFiles index.html, index.php +disableWebAdmin 0 + +errorlog logs/error.log { + logLevel DEBUG + debugLevel 0 + rollingSize 10M + enableStderrLog 1 +} + +accessLog logs/access.log { + rollingSize 10M + keepDays 30 + compressArchive 0 + logReferer 1 + logUserAgent 1 +} + +expires { + enableExpires 1 + expiresByType image/*=A604800,text/css=A604800,application/x-javascript=A604800,application/javascript=A604800,font/*=A604800,application/x-font-ttf=A604800 +} + +tuning{ + maxConnections 10000 + maxSSLConnections 10000 + connTimeout 300 + maxKeepAliveReq 10000 + smartKeepAlive 0 + keepAliveTimeout 5 + sndBufSize 0 + rcvBufSize 0 + gzipStaticCompressLevel 6 + gzipMaxFileSize 10M + eventDispatcher best + maxCachedFileSize 4096 + totalInMemCacheSize 20M + maxMMapFileSize 256K + totalMMapCacheSize 40M + useSendfile 1 + fileETag 28 + SSLCryptoDevice null + maxReqURLLen 32768 + maxReqHeaderSize 65536 + maxReqBodySize 2047M + maxDynRespHeaderSize 32768 + maxDynRespSize 2047M + enableGzipCompress 1 + enableBrCompress 4 + enableDynGzipCompress 1 + gzipCompressLevel 6 + brStaticCompressLevel 6 + compressibleTypes text/*, application/x-javascript, application/xml, application/javascript, image/svg+xml,application/rss+xml + gzipAutoUpdateStatic 1 + gzipMinFileSize 300 +} + +accessDenyDir{ + dir / + dir /etc/* + dir /dev/* + dir conf/* + dir admin/conf/* +} + +fileAccessControl{ + followSymbolLink 1 + checkSymbolLink 0 + requiredPermissionMask 000 + restrictedPermissionMask 000 +} + +perClientConnLimit{ + staticReqPerSec 0 + dynReqPerSec 0 + outBandwidth 0 + inBandwidth 0 + softLimit 10000 + hardLimit 10000 + gracePeriod 15 + banPeriod 300 +} + +CGIRLimit{ + maxCGIInstances 20 + minUID 11 + minGID 10 + priority 0 + CPUSoftLimit 10 + CPUHardLimit 50 + memSoftLimit 1460M + memHardLimit 1470M + procSoftLimit 400 + procHardLimit 450 +} + +accessControl{ + allow ALL + deny +} + +extProcessor lsphp{ + type lsapi + address uds://tmp/lshttpd/lsphp.sock + maxConns 10 + env PHP_LSAPI_CHILDREN=10 + env LSAPI_AVOID_FORK=200M + initTimeout 60 + retryTimeout 0 + persistConn 1 + pcKeepAliveTimeout + respBuffer 0 + autoStart 1 + path fcgi-bin/lsphp + backlog 100 + instances 1 + priority 0 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 1400 + procHardLimit 1500 +} + +scriptHandler{ + add lsapi:lsphp php +} + +railsDefaults{ + binPath + railsEnv 1 + maxConns 1 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +wsgiDefaults{ + binPath + railsEnv 1 + maxConns 5 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +nodeDefaults{ + binPath + railsEnv 1 + maxConns 5 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +virtualHost Example{ + vhRoot Example/ + allowSymbolLink 1 + enableScript 1 + restrained 1 + maxKeepAliveReq + smartKeepAlive + setUIDMode 0 + chrootMode 0 + configFile conf/vhosts/Example/vhconf.conf +} + +listener Default{ + address *:8088 + secure 0 + map Example * +} + +vhTemplate centralConfigLog{ + templateFile conf/templates/ccl.conf + listeners Default +} + +vhTemplate EasyRailsWithSuEXEC{ + templateFile conf/templates/rails.conf + listeners Default +} + +module cache { + ls_enabled 1 + + checkPrivateCache 1 + checkPublicCache 1 + maxCacheObjSize 10000000 + maxStaleAge 200 + qsCache 1 + reqCookieCache 1 + respCookieCache 1 + ignoreReqCacheCtrl 1 + ignoreRespCacheCtrl 0 + + enableCache 0 + expireInSeconds 3600 + enablePrivateCache 0 + privateExpireInSeconds 3600 + +} diff --git a/config/litespeed/1.6.4.lh/conf.bak/mime.properties b/config/litespeed/1.6.4.lh/conf.bak/mime.properties new file mode 100644 index 0000000..fa55ee8 --- /dev/null +++ b/config/litespeed/1.6.4.lh/conf.bak/mime.properties @@ -0,0 +1,162 @@ +default = application/octet-stream +3gp = video/3gpp +3g2 = video/3gpp2 +ai, eps = application/postscript +aif, aifc, aiff = audio/x-aiff +asc = text/plain +asf = video/asf +asx = video/x-ms-asf +au = audio/basic +avi = video/x-msvideo +bcpio = application/x-bcpio +bmp = image/bmp +bin = application/octet-stream +bz, bz2 = application/x-bzip +cdf = application/x-netcdf +class = application/java-vm +cpio = application/x-cpio +cpt = application/mac-compactpro +crt = application/x-x509-ca-cert +csh = application/x-csh +css = text/css +dcr,dir, dxr = application/x-director +dms = application/octet-stream +doc = application/msword +dtd = application/xml-dtd +dvi = application/x-dvi +eot = application/vnd.ms-fontobject +etx = text/x-setext +exe = application/x-executable +ez = application/andrew-inset +flv = video/x-flv +gif = image/gif +gtar = application/x-gtar +gz, gzip = application/gzip +hdf = application/x-hdf +hqx = application/mac-binhex40 +htc = text/x-component +html, htm = text/html +ice = x-conference/x-cooltalk +ico = image/x-icon +ief = image/ief +iges, igs = model/iges +iso = application/x-cd-image +java = text/plain +jar = application/java-archive +jnlp = application/x-java-jnlp-file +jpeg, jpe, jpg = image/jpeg +js = application/x-javascript +js2 = application/javascript +js3 = text/javascript +json = application/json +jsp = text/plain +kar = audio/midi +latex = application/x-latex +lha, lzh = application/octet-stream +man = application/x-troff-man +mdb = application/vnd.ms-access +me = application/x-troff-me +mesh = model/mesh +mid, midi = audio/midi +mif = application/vnd.mif +movie = video/x-sgi-movie +mov = video/quicktime +mp2, mp3, mpga = audio/mpeg +mpeg, mpe, mpg = video/mpeg +mp4 = video/mp4 +mpp = application/vnd.ms-project +ms = application/x-troff-ms +msh = model/mesh +nc = application/x-netcdf +oda = application/oda +odb = application/vnd.oasis.opendocument.database +odc = application/vnd.oasis.opendocument.chart +odf = application/vnd.oasis.opendocument.formula +odg = application/vnd.oasis.opendocument.graphics +odi = application/vnd.oasis.opendocument.image +odp = application/vnd.oasis.opendocument.presentation +ods = application/vnd.oasis.opendocument.spreadsheet +odt = application/vnd.oasis.opendocument.text +ogg = audio/ogg +otf = application/x-font-woff +pbm = image/x-portable-bitmap +pdb = chemical/x-pdb +pdf = application/pdf +pgm = image/x-portable-graymap +pgn = application/x-chess-pgn +pls = audio/x-scpls +png = image/png +pnm = image/x-portable-anymap +ppm = image/x-portable-pixmap +ppt = application/vnd.ms-powerpoint +ps = application/postscript +qt,qtvr = video/quicktime +ra = audio/x-realaudio +ram, rm = audio/x-pn-realaudio +rar = application/x-rar-compressed +ras = image/x-cmu-raster +rgb = image/x-rgb +roff, t, tr = application/x-troff +rss = application/rss+xml +rsd = application/rsd+xml +rtf = application/rtf +rtx = text/richtext +ser = application/java-serialized-object +sgml, sgm = text/sgml +sh = application/x-sh +shar = application/x-shar +shtml = application/x-httpd-shtml +silo = model/mesh +sit = application/x-stuffit +skd, skm, skp, skt = application/x-koan +smi,smil = application/smil +snd = audio/basic +spl = application/x-futuresplash +sql = text/x-sql +src = application/x-wais-source +sv4cpio = application/x-sv4cpio +sv4crc = application/x-sv4crc +svg, svgz = image/svg+xml +swf = application/x-shockwave-flash +tar = application/x-tar +tcl = application/x-tcl +tex = application/x-tex +texi, texinfo = application/x-texinfo +tgz = application/x-gtar +tiff, tif = image/tiff +tsv = text/tab-separated-values +ttf, ttc = application/x-font-ttf +txt = text/plain +ustar = application/x-ustar +vcd = application/x-cdlink +vrml = model/vrml +vxml = application/voicexml+xml +wav = audio/vnd.wave +wax = audio/x-ms-wax +wbmp = image/vnd.wap.wbmp +webp = image/webp +wma = audio/x-ms-wma +wml = text/vnd.wap.wml +wmlc = application/vnd.wap.wmlc +wmls = text/vnd.wap.wmlscript +wmlsc = application/vnd.wap.wmlscriptc +woff = application/font-woff +woff2 = font/woff2 +woff3 = font/woff +woff4 = application/font-woff2 +ttf2 = font/ttf +woff_o1 = application/x-font-woff +wtls-ca-certificate = application/vnd.wap.wtls-ca-certificate +wri = application/vnd.ms-write +wrl = model/vrml +xbm = image/x-xbitmap +xhtml, xht = application/xhtml+xml +xls = application/vnd.ms-excel +xml, xsd, xsl = application/xml +xml2 = text/xml +xslt = application/xslt+xml +xpm = image/x-xpixmap +xwd = image/x-xwindowdump +xyz = chemical/x-pdb +zip = application/zip +z = application/compress diff --git a/config/litespeed/1.6.4.lh/conf.bak/templates/ccl.conf b/config/litespeed/1.6.4.lh/conf.bak/templates/ccl.conf new file mode 100644 index 0000000..8ed9f7e --- /dev/null +++ b/config/litespeed/1.6.4.lh/conf.bak/templates/ccl.conf @@ -0,0 +1,84 @@ +allowSymbolLink 1 +chrootMode 0 +enableScript 1 +restrained 1 +setUIDMode 0 +vhRoot $SERVER_ROOT/$VH_NAME/ +configFile $SERVER_ROOT/conf/vhosts/$VH_NAME/vhconf.conf + +virtualHostConfig { + enableGzip 1 + docRoot $VH_ROOT/html/ + + hotlinkCtrl { + allowedHosts + enableHotlinkCtrl 0 + suffixes gif, jpeg, jpg + allowDirectAccess 1 + redirectUri + onlySelf 1 + } + + general { + enableContextAC 0 + } + + expires { + expiresDefault + enableExpires 1 + } + + rewrite { + enable 0 + logLevel 0 + } + + index { + useServer 0 + autoIndex 0 + indexFiles index.html + autoIndexURI /_autoindex/default.php + } + + accessLog $SERVER_ROOT/logs/$VH_NAME.access.log{ + useServer 0 + keepDays 30 + rollingSize 100M + compressArchive 1 + logUserAgent 1 + logReferer 1 + } + + errorlog { + useServer 1 + } + + context /cgi-bin/{ + type cgi + location $VH_ROOT/cgi-bin/ + allowBrowse 1 + } + + context / { + allowBrowse 1 + location $DOC_ROOT/ + rewrite { + RewriteFile .htaccess + } + } + + awstats { + updateMode 0 + siteAliases 127.0.0.1 localhost + updateInterval 86400 + updateOffset 0 + siteDomain localhost + workingDir $VH_ROOT/awstats + awstatsURI /awstats/ + } + + accessControl { + deny + allow * + } +} diff --git a/config/litespeed/1.6.4.lh/conf.bak/templates/phpsuexec.conf b/config/litespeed/1.6.4.lh/conf.bak/templates/phpsuexec.conf new file mode 100644 index 0000000..b5d9e27 --- /dev/null +++ b/config/litespeed/1.6.4.lh/conf.bak/templates/phpsuexec.conf @@ -0,0 +1,103 @@ +allowSymbolLink 1 +chrootMode 0 +enableScript 1 +restrained 1 +setUIDMode 2 +vhRoot $SERVER_ROOT/$VH_NAME/ +configFile $SERVER_ROOT/conf/vhosts/$VH_NAME/vhconf.conf + +virtualHostConfig { + enableGzip 1 + docRoot $VH_ROOT/public_html/ + + rewrite { + enable 0 + logLevel 0 + } + + awstats { + updateMode 0 + workingDir $VH_ROOT/awstats + awstatsURI /awstats/ + siteDomain localhost + siteAliases 127.0.0.1 localhost + updateInterval 86400 + updateOffset 0 + securedConn 0 + } + + extProcessor $VH_NAME_lsphp{ + path $SERVER_ROOT/fcgi-bin/lsphp + backlog 10 + instances 5 + runOnStartUp 0 + respBuffer 0 + autoStart 1 + extMaxIdleTime 60 + priority 0 + memSoftLimit 100M + memHardLimit 150M + procSoftLimit 100 + procHardLimit 200 + type lsapi + address uds://tmp/lshttpd/$VH_NAME_lsphp.sock + maxConns 5 + initTimeout 60 + retryTimeout 0 + persistConn 1 + pcKeepAliveTimeout 30 + } + + index { + useServer 0 + autoIndex 0 + autoIndexURI /_autoindex/default.php + indexFiles index.html + } + + accessLog $SERVER_ROOT/logs/$VH_NAME.access.log{ + keepDays 30 + rollingSize 100M + compressArchive 1 + useServer 0 + logHeaders 3 + } + + errorlog { + useServer 1 + } + + hotlinkCtrl { + enableHotlinkCtrl 0 + suffixes gif, jpeg, jpg + allowDirectAccess 1 + onlySelf 1 + } + + accessControl { + allow * + } + + scriptHandler { + add lsapi:$VH_NAME_lsphp php + } + + expires { + enableExpires 1 + } + + context /cgi-bin/{ + type cgi + location $VH_ROOT/cgi-bin/ + accessControl + rewrite + } + + context / { + allowBrowse 1 + location $DOC_ROOT/ + rewrite { + RewriteFile .htaccess + } + } +} diff --git a/config/litespeed/1.6.4.lh/conf.bak/templates/rails.conf b/config/litespeed/1.6.4.lh/conf.bak/templates/rails.conf new file mode 100644 index 0000000..e6a2fd3 --- /dev/null +++ b/config/litespeed/1.6.4.lh/conf.bak/templates/rails.conf @@ -0,0 +1,74 @@ +allowSymbolLink 1 +chrootMode 0 +enableScript 1 +restrained 1 +setUIDMode 2 +vhRoot $SERVER_ROOT/$VH_NAME/ +configFile $SERVER_ROOT/conf/vhosts/$VH_NAME/vhconf.conf + +virtualHostConfig { + enableGzip 1 + docRoot $VH_ROOT/public/ + + accessControl { + allow * + } + + hotlinkCtrl { + suffixes gif, jpeg, jpg + allowDirectAccess 1 + onlySelf 1 + enableHotlinkCtrl 0 + } + + rewrite { + enable 0 + logLevel 0 + } + + index { + useServer 0 + autoIndex 0 + indexFiles index.html + autoIndexURI /_autoindex/default.php + } + + accessLog $SERVER_ROOT/logs/$VH_NAME.access.log{ + logHeaders 3 + compressArchive 0 + useServer 0 + keepDays 30 + rollingSize 500M + } + + errorlog { + useServer 1 + } + + context / { + railsEnv 1 + maxConns 5 + location $VH_ROOT/ + type rails + accessControl + addDefaultCharset off + rewrite { + RewriteFile .htaccess + } + } + + expires { + enableExpires 1 + } + + awstats { + workingDir $VH_ROOT/awstats + awstatsURI /awstats/ + siteDomain localhost + siteAliases 127.0.0.1 localhost + updateMode 0 + updateInterval 86400 + updateOffset 0 + securedConn 0 + } +} diff --git a/config/litespeed/1.6.4.lh/conf.bak/vhosts/.DS_Store b/config/litespeed/1.6.4.lh/conf.bak/vhosts/.DS_Store new file mode 100644 index 0000000..4c26f37 Binary files /dev/null and b/config/litespeed/1.6.4.lh/conf.bak/vhosts/.DS_Store differ diff --git a/config/litespeed/1.6.4.lh/conf.bak/vhosts/Example/htgroup b/config/litespeed/1.6.4.lh/conf.bak/vhosts/Example/htgroup new file mode 100644 index 0000000..5f9c0c8 --- /dev/null +++ b/config/litespeed/1.6.4.lh/conf.bak/vhosts/Example/htgroup @@ -0,0 +1,4 @@ +group1: user1,user2, user3 +group2: +user: user8, test +group3: diff --git a/config/litespeed/1.6.4.lh/conf.bak/vhosts/Example/htpasswd b/config/litespeed/1.6.4.lh/conf.bak/vhosts/Example/htpasswd new file mode 100644 index 0000000..2b90853 --- /dev/null +++ b/config/litespeed/1.6.4.lh/conf.bak/vhosts/Example/htpasswd @@ -0,0 +1,2 @@ +test:kF2EDBE2Ux8sQ +user1:SQtevcsBBnBPY diff --git a/config/litespeed/1.6.4.lh/conf.bak/vhosts/Example/vhconf.conf b/config/litespeed/1.6.4.lh/conf.bak/vhosts/Example/vhconf.conf new file mode 100644 index 0000000..7f2da5a --- /dev/null +++ b/config/litespeed/1.6.4.lh/conf.bak/vhosts/Example/vhconf.conf @@ -0,0 +1,91 @@ +docRoot /var/www/html/ +enableGzip 1 +cgroups 0 + +errorlog $VH_ROOT/logs/error.log { + useServer 1 + logLevel DEBUG + rollingSize 10M +} + +accesslog $VH_ROOT/logs/access.log { + useServer 0 + rollingSize 10M + keepDays 7 + compressArchive 0 +} + +index { + useServer 0 + indexFiles index.html, index.php + autoIndex 0 + autoIndexURI /_autoindex/default.php +} + +errorpage 404 { + url /error404.html +} + +expires { + enableExpires 1 +} + +accessControl { + allow * +} + +realm SampleProtectedArea { + + userDB { + location conf/vhosts/Example/htpasswd + maxCacheSize 200 + cacheTimeout 60 + } + + groupDB { + location conf/vhosts/Example/htgroup + maxCacheSize 200 + cacheTimeout 60 + } +} + +context / { + location $DOC_ROOT/ + allowBrowse 1 + + rewrite { +RewriteFile .htaccess + } +} + +context /docs/ { + location $SERVER_ROOT/docs/ + allowBrowse 1 +} + +context /protected/ { + location protected/ + allowBrowse 1 + realm SampleProtectedArea + authName Protected + required user test + + accessControl { + allow * + } +} + +context /blocked/ { + allowBrowse 0 +} + +context /cgi-bin/ { + type cgi + location $VH_ROOT/cgi-bin/ +} + +rewrite { + enable 1 + autoLoadHtaccess 1 + logLevel 0 +} diff --git a/config/litespeed/1.6.4.lh/conf.bak/vhosts/Example/vhconf.conf.bak b/config/litespeed/1.6.4.lh/conf.bak/vhosts/Example/vhconf.conf.bak new file mode 100644 index 0000000..21bbb78 --- /dev/null +++ b/config/litespeed/1.6.4.lh/conf.bak/vhosts/Example/vhconf.conf.bak @@ -0,0 +1,115 @@ +docRoot $VH_ROOT/html/ +enableGzip 1 + + +context / { + allowBrowse 1 + location $DOC_ROOT/ + rewrite { + RewriteFile .htaccess + } +} + +context /docs/{ + allowBrowse 1 + location $SERVER_ROOT/docs/ +} + +context /protected/{ + required user test + authName Protected + allowBrowse 1 + location protected/ + realm SampleProtectedArea + + accessControl { + deny + allow * + } +} + +context /blocked/{ + allowBrowse 0 +} + +context /cgi-bin/{ + allowBrowse 1 + location $VH_ROOT/cgi-bin/ + type cgi +} + +expires { + enableExpires 1 +} + +index { + autoIndexURI /_autoindex/default.php + indexFiles index.html + autoIndex 0 + useServer 0 +} + +errorPage 404{ + url /error404.html +} + +errorlog $VH_ROOT/logs/error.log{ + logLevel DEBUG + rollingSize 10M + useServer 1 +} + +accessLog $VH_ROOT/logs/access.log{ + compressArchive 0 + logReferer 1 + keepDays 30 + rollingSize 10M + logUserAgent 1 + useServer 0 +} + +awstats { + updateInterval 86400 + workingDir $VH_ROOT/awstats + updateOffset 0 + siteDomain localhost + siteAliases 127.0.0.1 localhost + updateMode 0 + awstatsURI /awstats/ +} + +rewrite { + enable 0 + logLevel 0 +} + +hotlinkCtrl { + suffixes gif, jpeg, jpg + allowedHosts + allowDirectAccess 1 + enableHotlinkCtrl 0 + onlySelf 1 +} + +accessControl { + deny + allow * +} + +realm SampleProtectedArea { + userDB { + cacheTimeout 60 + maxCacheSize 200 + location conf/vhosts/Example/htpasswd + } + + groupDB { + cacheTimeout 60 + maxCacheSize 200 + location conf/vhosts/Example/htgroup + } +} + +general { + enableContextAC 0 +} diff --git a/config/litespeed/1.6.4.lh/conf/httpd_config.conf b/config/litespeed/1.6.4.lh/conf/httpd_config.conf new file mode 100644 index 0000000..18bf7b5 --- /dev/null +++ b/config/litespeed/1.6.4.lh/conf/httpd_config.conf @@ -0,0 +1,238 @@ +# +# PLAIN TEXT CONFIGURATION FILE +# +#It not set, will use host name as serverName +serverName +user nobody +group nogroup +priority 0 +inMemBufSize 60M +swappingDir /tmp/lshttpd/swap +autoFix503 1 +gracefulRestartTimeout 300 +mime conf/mime.properties +showVersionNumber 0 +adminEmails root@localhost + +errorlog logs/error.log { + logLevel DEBUG + debugLevel 0 + rollingSize 10M + enableStderrLog 1 +} + +accesslog logs/access.log { + rollingSize 10M + keepDays 30 + compressArchive 0 +} +indexFiles index.html, index.php + +expires { + enableExpires 1 + expiresByType image/*=A604800,text/css=A604800,application/x-javascript=A604800,application/javascript=A604800,font/*=A604800,application/x-font-ttf=A604800 +} + +tuning { + maxConnections 10000 + maxSSLConnections 10000 + connTimeout 300 + maxKeepAliveReq 10000 + smartKeepAlive 0 + keepAliveTimeout 5 + sndBufSize 0 + rcvBufSize 0 + maxReqURLLen 32768 + maxReqHeaderSize 65536 + maxReqBodySize 2047M + maxDynRespHeaderSize 32768 + maxDynRespSize 2047M + maxCachedFileSize 4096 + totalInMemCacheSize 20M + maxMMapFileSize 256K + totalMMapCacheSize 40M + useSendfile 1 + fileETag 28 + enableGzipCompress 1 + compressibleTypes text/*, application/x-javascript, application/xml, application/javascript, image/svg+xml,application/rss+xml + enableDynGzipCompress 1 + gzipCompressLevel 6 + gzipAutoUpdateStatic 1 + gzipStaticCompressLevel 6 + brStaticCompressLevel 6 + gzipMaxFileSize 10M + gzipMinFileSize 300 + + quicEnable 1 + quicShmDir /dev/shm +} + +fileAccessControl { + followSymbolLink 1 + checkSymbolLink 0 + requiredPermissionMask 000 + restrictedPermissionMask 000 +} + +perClientConnLimit { + staticReqPerSec 0 + dynReqPerSec 0 + outBandwidth 0 + inBandwidth 0 + softLimit 10000 + hardLimit 10000 + gracePeriod 15 + banPeriod 300 +} + +CGIRLimit { + maxCGIInstances 20 + minUID 11 + minGID 10 + priority 0 + CPUSoftLimit 10 + CPUHardLimit 50 + memSoftLimit 1460M + memHardLimit 1470M + procSoftLimit 400 + procHardLimit 450 +} + +accessDenyDir { + dir / + dir /etc/* + dir /dev/* + dir conf/* + dir admin/conf/* +} + +accessControl { + allow ALL +} + +extprocessor lsphp { + type lsapi + address uds://tmp/lshttpd/lsphp.sock + maxConns 10 + env PHP_LSAPI_CHILDREN=10 + env LSAPI_AVOID_FORK=200M + initTimeout 60 + retryTimeout 0 + persistConn 1 + respBuffer 0 + autoStart 1 + path fcgi-bin/lsphp + backlog 100 + instances 1 + priority 0 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 1400 + procHardLimit 1500 +} + +scripthandler { + add lsapi:lsphp php +} + +railsDefaults { + maxConns 1 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +wsgiDefaults { + maxConns 5 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +nodeDefaults { + maxConns 5 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +module cache { + +checkPrivateCache 1 +checkPublicCache 1 +maxCacheObjSize 10000000 +maxStaleAge 200 +qsCache 1 +reqCookieCache 1 +respCookieCache 1 +ignoreReqCacheCtrl 1 +ignoreRespCacheCtrl 0 + +enableCache 0 +expireInSeconds 3600 +enablePrivateCache 0 +privateExpireInSeconds 3600 + ls_enabled 1 +} + +virtualhost Example { + vhRoot Example/ + configFile conf/vhosts/Example/vhconf.conf + allowSymbolLink 1 + enableScript 1 + restrained 1 + setUIDMode 0 +} + +listener Default { + address *:8088 + secure 0 + map Example * +} + +listener HTTP { + address *:80 + secure 0 +} + +vhTemplate centralConfigLog { + templateFile conf/templates/ccl.conf + listeners Default +} + +vhTemplate EasyRailsWithSuEXEC { + templateFile conf/templates/rails.conf + listeners Default +} + +#include /usr/local/lsws/conf/sites.conf diff --git a/config/litespeed/1.6.4.lh/conf/httpd_config.conf.bak b/config/litespeed/1.6.4.lh/conf/httpd_config.conf.bak new file mode 100644 index 0000000..332ed2e --- /dev/null +++ b/config/litespeed/1.6.4.lh/conf/httpd_config.conf.bak @@ -0,0 +1,237 @@ +# +# PLAIN TEXT CONFIGURATION FILE +# +#It not set, will use host name as serverName +serverName +user nobody +group nogroup +priority 0 +inMemBufSize 60M +swappingDir /tmp/lshttpd/swap +autoFix503 1 +gracefulRestartTimeout 300 +mime conf/mime.properties +showVersionNumber 0 +adminEmails root@localhost + +errorlog logs/error.log { + logLevel DEBUG + debugLevel 0 + rollingSize 10M + enableStderrLog 1 +} + +accesslog logs/access.log { + rollingSize 10M + keepDays 30 + compressArchive 0 +} +indexFiles index.html, index.php + +expires { + enableExpires 1 + expiresByType image/*=A604800,text/css=A604800,application/x-javascript=A604800,application/javascript=A604800,font/*=A604800,application/x-font-ttf=A604800 +} + +tuning { + maxConnections 10000 + maxSSLConnections 10000 + connTimeout 300 + maxKeepAliveReq 10000 + smartKeepAlive 0 + keepAliveTimeout 5 + sndBufSize 0 + rcvBufSize 0 + maxReqURLLen 32768 + maxReqHeaderSize 65536 + maxReqBodySize 2047M + maxDynRespHeaderSize 32768 + maxDynRespSize 2047M + maxCachedFileSize 4096 + totalInMemCacheSize 20M + maxMMapFileSize 256K + totalMMapCacheSize 40M + useSendfile 1 + fileETag 28 + enableGzipCompress 1 + compressibleTypes text/*, application/x-javascript, application/xml, application/javascript, image/svg+xml,application/rss+xml + enableDynGzipCompress 1 + gzipCompressLevel 6 + gzipAutoUpdateStatic 1 + gzipStaticCompressLevel 6 + brStaticCompressLevel 6 + gzipMaxFileSize 10M + gzipMinFileSize 300 + + quicEnable 1 + quicShmDir /dev/shm +} + +fileAccessControl { + followSymbolLink 1 + checkSymbolLink 0 + requiredPermissionMask 000 + restrictedPermissionMask 000 +} + +perClientConnLimit { + staticReqPerSec 0 + dynReqPerSec 0 + outBandwidth 0 + inBandwidth 0 + softLimit 10000 + hardLimit 10000 + gracePeriod 15 + banPeriod 300 +} + +CGIRLimit { + maxCGIInstances 20 + minUID 11 + minGID 10 + priority 0 + CPUSoftLimit 10 + CPUHardLimit 50 + memSoftLimit 1460M + memHardLimit 1470M + procSoftLimit 400 + procHardLimit 450 +} + +accessDenyDir { + dir / + dir /etc/* + dir /dev/* + dir conf/* + dir admin/conf/* +} + +accessControl { + allow ALL +} + +extprocessor lsphp { + type lsapi + address uds://tmp/lshttpd/lsphp.sock + maxConns 10 + env PHP_LSAPI_CHILDREN=10 + env LSAPI_AVOID_FORK=200M + initTimeout 60 + retryTimeout 0 + persistConn 1 + respBuffer 0 + autoStart 1 + path fcgi-bin/lsphp + backlog 100 + instances 1 + priority 0 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 1400 + procHardLimit 1500 +} + +scripthandler { + add lsapi:lsphp php +} + +railsDefaults { + maxConns 1 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +wsgiDefaults { + maxConns 5 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +nodeDefaults { + maxConns 5 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +module cache { + +checkPrivateCache 1 +checkPublicCache 1 +maxCacheObjSize 10000000 +maxStaleAge 200 +qsCache 1 +reqCookieCache 1 +respCookieCache 1 +ignoreReqCacheCtrl 1 +ignoreRespCacheCtrl 0 + +enableCache 0 +expireInSeconds 3600 +enablePrivateCache 0 +privateExpireInSeconds 3600 + ls_enabled 1 +} + +virtualhost Example { + vhRoot Example/ + configFile conf/vhosts/Example/vhconf.conf + allowSymbolLink 1 + enableScript 1 + restrained 1 + setUIDMode 0 +} + +listener Default { + address *:8088 + secure 0 + map Example * +} + +listener HTTP { + address *:80 + secure 0 +} + +vhTemplate centralConfigLog { + templateFile conf/templates/ccl.conf + listeners Default +} + +vhTemplate EasyRailsWithSuEXEC { + templateFile conf/templates/rails.conf + listeners Default +} + diff --git a/config/litespeed/1.6.4.lh/conf/httpd_config.conf0 b/config/litespeed/1.6.4.lh/conf/httpd_config.conf0 new file mode 100644 index 0000000..78deb80 --- /dev/null +++ b/config/litespeed/1.6.4.lh/conf/httpd_config.conf0 @@ -0,0 +1,242 @@ +# +# PLAIN TEXT CONFIGURATION FILE +# +#It not set, will use host name as serverName +serverName +user nobody +group nogroup +priority 0 +inMemBufSize 60M +swappingDir /tmp/lshttpd/swap +autoFix503 1 +gracefulRestartTimeout 300 +mime conf/mime.properties +showVersionNumber 0 +adminEmails root@localhost + +errorlog logs/error.log { + logLevel DEBUG + debugLevel 0 + rollingSize 10M + enableStderrLog 1 +} + +accesslog logs/access.log { + rollingSize 10M + keepDays 30 + compressArchive 0 +} +indexFiles index.html, index.php + +expires { + enableExpires 1 + expiresByType image/*=A604800,text/css=A604800,application/x-javascript=A604800,application/javascript=A604800,font/*=A604800,application/x-font-ttf=A604800 +} + +tuning { + maxConnections 10000 + maxSSLConnections 10000 + connTimeout 300 + maxKeepAliveReq 10000 + smartKeepAlive 0 + keepAliveTimeout 5 + sndBufSize 0 + rcvBufSize 0 + maxReqURLLen 32768 + maxReqHeaderSize 65536 + maxReqBodySize 2047M + maxDynRespHeaderSize 32768 + maxDynRespSize 2047M + maxCachedFileSize 4096 + totalInMemCacheSize 20M + maxMMapFileSize 256K + totalMMapCacheSize 40M + useSendfile 1 + fileETag 28 + enableGzipCompress 1 + compressibleTypes text/*, application/x-javascript, application/xml, application/javascript, image/svg+xml,application/rss+xml + enableDynGzipCompress 1 + gzipCompressLevel 6 + gzipAutoUpdateStatic 1 + gzipStaticCompressLevel 6 + brStaticCompressLevel 6 + gzipMaxFileSize 10M + gzipMinFileSize 300 + + quicEnable 1 + quicShmDir /dev/shm +} + +fileAccessControl { + followSymbolLink 1 + checkSymbolLink 0 + requiredPermissionMask 000 + restrictedPermissionMask 000 +} + +perClientConnLimit { + staticReqPerSec 0 + dynReqPerSec 0 + outBandwidth 0 + inBandwidth 0 + softLimit 10000 + hardLimit 10000 + gracePeriod 15 + banPeriod 300 +} + +CGIRLimit { + maxCGIInstances 20 + minUID 11 + minGID 10 + priority 0 + CPUSoftLimit 10 + CPUHardLimit 50 + memSoftLimit 1460M + memHardLimit 1470M + procSoftLimit 400 + procHardLimit 450 +} + +accessDenyDir { + dir / + dir /etc/* + dir /dev/* + dir conf/* + dir admin/conf/* +} + +accessControl { + allow ALL +} + +extprocessor lsphp { + type lsapi + address uds://tmp/lshttpd/lsphp.sock + maxConns 10 + env PHP_LSAPI_CHILDREN=10 + env LSAPI_AVOID_FORK=200M + initTimeout 60 + retryTimeout 0 + persistConn 1 + respBuffer 0 + autoStart 1 + path fcgi-bin/lsphp + backlog 100 + instances 1 + priority 0 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 1400 + procHardLimit 1500 +} + +scripthandler { + add lsapi:lsphp php +} + +railsDefaults { + maxConns 1 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +wsgiDefaults { + maxConns 5 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +nodeDefaults { + maxConns 5 + env LSAPI_MAX_IDLE=60 + initTimeout 60 + retryTimeout 0 + pcKeepAliveTimeout 60 + respBuffer 0 + backlog 50 + runOnStartUp 3 + extMaxIdleTime 300 + priority 3 + memSoftLimit 2047M + memHardLimit 2047M + procSoftLimit 500 + procHardLimit 600 +} + +module cache { + +checkPrivateCache 1 +checkPublicCache 1 +maxCacheObjSize 10000000 +maxStaleAge 200 +qsCache 1 +reqCookieCache 1 +respCookieCache 1 +ignoreReqCacheCtrl 1 +ignoreRespCacheCtrl 0 + +enableCache 0 +expireInSeconds 3600 +enablePrivateCache 0 +privateExpireInSeconds 3600 + ls_enabled 1 +} + +virtualhost Example { + vhRoot Example/ + configFile conf/vhosts/Example/vhconf.conf + allowSymbolLink 1 + enableScript 1 + restrained 1 + setUIDMode 0 +} + +listener Default { + address *:8088 + secure 0 + map Example * +} + +listener HTTP { + address *:80 + secure 0 +} + +listener HTTPS { + address *:443 + secure 1 +} + +vhTemplate centralConfigLog { + templateFile conf/templates/ccl.conf + listeners Default +} + +vhTemplate EasyRailsWithSuEXEC { + templateFile conf/templates/rails.conf + listeners Default +} + diff --git a/config/litespeed/1.6.4.lh/conf/mime.properties b/config/litespeed/1.6.4.lh/conf/mime.properties new file mode 100755 index 0000000..fa55ee8 --- /dev/null +++ b/config/litespeed/1.6.4.lh/conf/mime.properties @@ -0,0 +1,162 @@ +default = application/octet-stream +3gp = video/3gpp +3g2 = video/3gpp2 +ai, eps = application/postscript +aif, aifc, aiff = audio/x-aiff +asc = text/plain +asf = video/asf +asx = video/x-ms-asf +au = audio/basic +avi = video/x-msvideo +bcpio = application/x-bcpio +bmp = image/bmp +bin = application/octet-stream +bz, bz2 = application/x-bzip +cdf = application/x-netcdf +class = application/java-vm +cpio = application/x-cpio +cpt = application/mac-compactpro +crt = application/x-x509-ca-cert +csh = application/x-csh +css = text/css +dcr,dir, dxr = application/x-director +dms = application/octet-stream +doc = application/msword +dtd = application/xml-dtd +dvi = application/x-dvi +eot = application/vnd.ms-fontobject +etx = text/x-setext +exe = application/x-executable +ez = application/andrew-inset +flv = video/x-flv +gif = image/gif +gtar = application/x-gtar +gz, gzip = application/gzip +hdf = application/x-hdf +hqx = application/mac-binhex40 +htc = text/x-component +html, htm = text/html +ice = x-conference/x-cooltalk +ico = image/x-icon +ief = image/ief +iges, igs = model/iges +iso = application/x-cd-image +java = text/plain +jar = application/java-archive +jnlp = application/x-java-jnlp-file +jpeg, jpe, jpg = image/jpeg +js = application/x-javascript +js2 = application/javascript +js3 = text/javascript +json = application/json +jsp = text/plain +kar = audio/midi +latex = application/x-latex +lha, lzh = application/octet-stream +man = application/x-troff-man +mdb = application/vnd.ms-access +me = application/x-troff-me +mesh = model/mesh +mid, midi = audio/midi +mif = application/vnd.mif +movie = video/x-sgi-movie +mov = video/quicktime +mp2, mp3, mpga = audio/mpeg +mpeg, mpe, mpg = video/mpeg +mp4 = video/mp4 +mpp = application/vnd.ms-project +ms = application/x-troff-ms +msh = model/mesh +nc = application/x-netcdf +oda = application/oda +odb = application/vnd.oasis.opendocument.database +odc = application/vnd.oasis.opendocument.chart +odf = application/vnd.oasis.opendocument.formula +odg = application/vnd.oasis.opendocument.graphics +odi = application/vnd.oasis.opendocument.image +odp = application/vnd.oasis.opendocument.presentation +ods = application/vnd.oasis.opendocument.spreadsheet +odt = application/vnd.oasis.opendocument.text +ogg = audio/ogg +otf = application/x-font-woff +pbm = image/x-portable-bitmap +pdb = chemical/x-pdb +pdf = application/pdf +pgm = image/x-portable-graymap +pgn = application/x-chess-pgn +pls = audio/x-scpls +png = image/png +pnm = image/x-portable-anymap +ppm = image/x-portable-pixmap +ppt = application/vnd.ms-powerpoint +ps = application/postscript +qt,qtvr = video/quicktime +ra = audio/x-realaudio +ram, rm = audio/x-pn-realaudio +rar = application/x-rar-compressed +ras = image/x-cmu-raster +rgb = image/x-rgb +roff, t, tr = application/x-troff +rss = application/rss+xml +rsd = application/rsd+xml +rtf = application/rtf +rtx = text/richtext +ser = application/java-serialized-object +sgml, sgm = text/sgml +sh = application/x-sh +shar = application/x-shar +shtml = application/x-httpd-shtml +silo = model/mesh +sit = application/x-stuffit +skd, skm, skp, skt = application/x-koan +smi,smil = application/smil +snd = audio/basic +spl = application/x-futuresplash +sql = text/x-sql +src = application/x-wais-source +sv4cpio = application/x-sv4cpio +sv4crc = application/x-sv4crc +svg, svgz = image/svg+xml +swf = application/x-shockwave-flash +tar = application/x-tar +tcl = application/x-tcl +tex = application/x-tex +texi, texinfo = application/x-texinfo +tgz = application/x-gtar +tiff, tif = image/tiff +tsv = text/tab-separated-values +ttf, ttc = application/x-font-ttf +txt = text/plain +ustar = application/x-ustar +vcd = application/x-cdlink +vrml = model/vrml +vxml = application/voicexml+xml +wav = audio/vnd.wave +wax = audio/x-ms-wax +wbmp = image/vnd.wap.wbmp +webp = image/webp +wma = audio/x-ms-wma +wml = text/vnd.wap.wml +wmlc = application/vnd.wap.wmlc +wmls = text/vnd.wap.wmlscript +wmlsc = application/vnd.wap.wmlscriptc +woff = application/font-woff +woff2 = font/woff2 +woff3 = font/woff +woff4 = application/font-woff2 +ttf2 = font/ttf +woff_o1 = application/x-font-woff +wtls-ca-certificate = application/vnd.wap.wtls-ca-certificate +wri = application/vnd.ms-write +wrl = model/vrml +xbm = image/x-xbitmap +xhtml, xht = application/xhtml+xml +xls = application/vnd.ms-excel +xml, xsd, xsl = application/xml +xml2 = text/xml +xslt = application/xslt+xml +xpm = image/x-xpixmap +xwd = image/x-xwindowdump +xyz = chemical/x-pdb +zip = application/zip +z = application/compress diff --git a/config/litespeed/1.6.4.lh/conf/mime.properties0 b/config/litespeed/1.6.4.lh/conf/mime.properties0 new file mode 100755 index 0000000..fa55ee8 --- /dev/null +++ b/config/litespeed/1.6.4.lh/conf/mime.properties0 @@ -0,0 +1,162 @@ +default = application/octet-stream +3gp = video/3gpp +3g2 = video/3gpp2 +ai, eps = application/postscript +aif, aifc, aiff = audio/x-aiff +asc = text/plain +asf = video/asf +asx = video/x-ms-asf +au = audio/basic +avi = video/x-msvideo +bcpio = application/x-bcpio +bmp = image/bmp +bin = application/octet-stream +bz, bz2 = application/x-bzip +cdf = application/x-netcdf +class = application/java-vm +cpio = application/x-cpio +cpt = application/mac-compactpro +crt = application/x-x509-ca-cert +csh = application/x-csh +css = text/css +dcr,dir, dxr = application/x-director +dms = application/octet-stream +doc = application/msword +dtd = application/xml-dtd +dvi = application/x-dvi +eot = application/vnd.ms-fontobject +etx = text/x-setext +exe = application/x-executable +ez = application/andrew-inset +flv = video/x-flv +gif = image/gif +gtar = application/x-gtar +gz, gzip = application/gzip +hdf = application/x-hdf +hqx = application/mac-binhex40 +htc = text/x-component +html, htm = text/html +ice = x-conference/x-cooltalk +ico = image/x-icon +ief = image/ief +iges, igs = model/iges +iso = application/x-cd-image +java = text/plain +jar = application/java-archive +jnlp = application/x-java-jnlp-file +jpeg, jpe, jpg = image/jpeg +js = application/x-javascript +js2 = application/javascript +js3 = text/javascript +json = application/json +jsp = text/plain +kar = audio/midi +latex = application/x-latex +lha, lzh = application/octet-stream +man = application/x-troff-man +mdb = application/vnd.ms-access +me = application/x-troff-me +mesh = model/mesh +mid, midi = audio/midi +mif = application/vnd.mif +movie = video/x-sgi-movie +mov = video/quicktime +mp2, mp3, mpga = audio/mpeg +mpeg, mpe, mpg = video/mpeg +mp4 = video/mp4 +mpp = application/vnd.ms-project +ms = application/x-troff-ms +msh = model/mesh +nc = application/x-netcdf +oda = application/oda +odb = application/vnd.oasis.opendocument.database +odc = application/vnd.oasis.opendocument.chart +odf = application/vnd.oasis.opendocument.formula +odg = application/vnd.oasis.opendocument.graphics +odi = application/vnd.oasis.opendocument.image +odp = application/vnd.oasis.opendocument.presentation +ods = application/vnd.oasis.opendocument.spreadsheet +odt = application/vnd.oasis.opendocument.text +ogg = audio/ogg +otf = application/x-font-woff +pbm = image/x-portable-bitmap +pdb = chemical/x-pdb +pdf = application/pdf +pgm = image/x-portable-graymap +pgn = application/x-chess-pgn +pls = audio/x-scpls +png = image/png +pnm = image/x-portable-anymap +ppm = image/x-portable-pixmap +ppt = application/vnd.ms-powerpoint +ps = application/postscript +qt,qtvr = video/quicktime +ra = audio/x-realaudio +ram, rm = audio/x-pn-realaudio +rar = application/x-rar-compressed +ras = image/x-cmu-raster +rgb = image/x-rgb +roff, t, tr = application/x-troff +rss = application/rss+xml +rsd = application/rsd+xml +rtf = application/rtf +rtx = text/richtext +ser = application/java-serialized-object +sgml, sgm = text/sgml +sh = application/x-sh +shar = application/x-shar +shtml = application/x-httpd-shtml +silo = model/mesh +sit = application/x-stuffit +skd, skm, skp, skt = application/x-koan +smi,smil = application/smil +snd = audio/basic +spl = application/x-futuresplash +sql = text/x-sql +src = application/x-wais-source +sv4cpio = application/x-sv4cpio +sv4crc = application/x-sv4crc +svg, svgz = image/svg+xml +swf = application/x-shockwave-flash +tar = application/x-tar +tcl = application/x-tcl +tex = application/x-tex +texi, texinfo = application/x-texinfo +tgz = application/x-gtar +tiff, tif = image/tiff +tsv = text/tab-separated-values +ttf, ttc = application/x-font-ttf +txt = text/plain +ustar = application/x-ustar +vcd = application/x-cdlink +vrml = model/vrml +vxml = application/voicexml+xml +wav = audio/vnd.wave +wax = audio/x-ms-wax +wbmp = image/vnd.wap.wbmp +webp = image/webp +wma = audio/x-ms-wma +wml = text/vnd.wap.wml +wmlc = application/vnd.wap.wmlc +wmls = text/vnd.wap.wmlscript +wmlsc = application/vnd.wap.wmlscriptc +woff = application/font-woff +woff2 = font/woff2 +woff3 = font/woff +woff4 = application/font-woff2 +ttf2 = font/ttf +woff_o1 = application/x-font-woff +wtls-ca-certificate = application/vnd.wap.wtls-ca-certificate +wri = application/vnd.ms-write +wrl = model/vrml +xbm = image/x-xbitmap +xhtml, xht = application/xhtml+xml +xls = application/vnd.ms-excel +xml, xsd, xsl = application/xml +xml2 = text/xml +xslt = application/xslt+xml +xpm = image/x-xpixmap +xwd = image/x-xwindowdump +xyz = chemical/x-pdb +zip = application/zip +z = application/compress diff --git a/config/litespeed/1.6.4.lh/conf/templates/ccl.conf b/config/litespeed/1.6.4.lh/conf/templates/ccl.conf new file mode 100755 index 0000000..8ed9f7e --- /dev/null +++ b/config/litespeed/1.6.4.lh/conf/templates/ccl.conf @@ -0,0 +1,84 @@ +allowSymbolLink 1 +chrootMode 0 +enableScript 1 +restrained 1 +setUIDMode 0 +vhRoot $SERVER_ROOT/$VH_NAME/ +configFile $SERVER_ROOT/conf/vhosts/$VH_NAME/vhconf.conf + +virtualHostConfig { + enableGzip 1 + docRoot $VH_ROOT/html/ + + hotlinkCtrl { + allowedHosts + enableHotlinkCtrl 0 + suffixes gif, jpeg, jpg + allowDirectAccess 1 + redirectUri + onlySelf 1 + } + + general { + enableContextAC 0 + } + + expires { + expiresDefault + enableExpires 1 + } + + rewrite { + enable 0 + logLevel 0 + } + + index { + useServer 0 + autoIndex 0 + indexFiles index.html + autoIndexURI /_autoindex/default.php + } + + accessLog $SERVER_ROOT/logs/$VH_NAME.access.log{ + useServer 0 + keepDays 30 + rollingSize 100M + compressArchive 1 + logUserAgent 1 + logReferer 1 + } + + errorlog { + useServer 1 + } + + context /cgi-bin/{ + type cgi + location $VH_ROOT/cgi-bin/ + allowBrowse 1 + } + + context / { + allowBrowse 1 + location $DOC_ROOT/ + rewrite { + RewriteFile .htaccess + } + } + + awstats { + updateMode 0 + siteAliases 127.0.0.1 localhost + updateInterval 86400 + updateOffset 0 + siteDomain localhost + workingDir $VH_ROOT/awstats + awstatsURI /awstats/ + } + + accessControl { + deny + allow * + } +} diff --git a/config/litespeed/1.6.4.lh/conf/templates/ccl.conf0 b/config/litespeed/1.6.4.lh/conf/templates/ccl.conf0 new file mode 100755 index 0000000..8ed9f7e --- /dev/null +++ b/config/litespeed/1.6.4.lh/conf/templates/ccl.conf0 @@ -0,0 +1,84 @@ +allowSymbolLink 1 +chrootMode 0 +enableScript 1 +restrained 1 +setUIDMode 0 +vhRoot $SERVER_ROOT/$VH_NAME/ +configFile $SERVER_ROOT/conf/vhosts/$VH_NAME/vhconf.conf + +virtualHostConfig { + enableGzip 1 + docRoot $VH_ROOT/html/ + + hotlinkCtrl { + allowedHosts + enableHotlinkCtrl 0 + suffixes gif, jpeg, jpg + allowDirectAccess 1 + redirectUri + onlySelf 1 + } + + general { + enableContextAC 0 + } + + expires { + expiresDefault + enableExpires 1 + } + + rewrite { + enable 0 + logLevel 0 + } + + index { + useServer 0 + autoIndex 0 + indexFiles index.html + autoIndexURI /_autoindex/default.php + } + + accessLog $SERVER_ROOT/logs/$VH_NAME.access.log{ + useServer 0 + keepDays 30 + rollingSize 100M + compressArchive 1 + logUserAgent 1 + logReferer 1 + } + + errorlog { + useServer 1 + } + + context /cgi-bin/{ + type cgi + location $VH_ROOT/cgi-bin/ + allowBrowse 1 + } + + context / { + allowBrowse 1 + location $DOC_ROOT/ + rewrite { + RewriteFile .htaccess + } + } + + awstats { + updateMode 0 + siteAliases 127.0.0.1 localhost + updateInterval 86400 + updateOffset 0 + siteDomain localhost + workingDir $VH_ROOT/awstats + awstatsURI /awstats/ + } + + accessControl { + deny + allow * + } +} diff --git a/config/litespeed/1.6.4.lh/conf/templates/rails.conf b/config/litespeed/1.6.4.lh/conf/templates/rails.conf new file mode 100755 index 0000000..e6a2fd3 --- /dev/null +++ b/config/litespeed/1.6.4.lh/conf/templates/rails.conf @@ -0,0 +1,74 @@ +allowSymbolLink 1 +chrootMode 0 +enableScript 1 +restrained 1 +setUIDMode 2 +vhRoot $SERVER_ROOT/$VH_NAME/ +configFile $SERVER_ROOT/conf/vhosts/$VH_NAME/vhconf.conf + +virtualHostConfig { + enableGzip 1 + docRoot $VH_ROOT/public/ + + accessControl { + allow * + } + + hotlinkCtrl { + suffixes gif, jpeg, jpg + allowDirectAccess 1 + onlySelf 1 + enableHotlinkCtrl 0 + } + + rewrite { + enable 0 + logLevel 0 + } + + index { + useServer 0 + autoIndex 0 + indexFiles index.html + autoIndexURI /_autoindex/default.php + } + + accessLog $SERVER_ROOT/logs/$VH_NAME.access.log{ + logHeaders 3 + compressArchive 0 + useServer 0 + keepDays 30 + rollingSize 500M + } + + errorlog { + useServer 1 + } + + context / { + railsEnv 1 + maxConns 5 + location $VH_ROOT/ + type rails + accessControl + addDefaultCharset off + rewrite { + RewriteFile .htaccess + } + } + + expires { + enableExpires 1 + } + + awstats { + workingDir $VH_ROOT/awstats + awstatsURI /awstats/ + siteDomain localhost + siteAliases 127.0.0.1 localhost + updateMode 0 + updateInterval 86400 + updateOffset 0 + securedConn 0 + } +} diff --git a/config/litespeed/1.6.4.lh/conf/templates/rails.conf0 b/config/litespeed/1.6.4.lh/conf/templates/rails.conf0 new file mode 100755 index 0000000..e6a2fd3 --- /dev/null +++ b/config/litespeed/1.6.4.lh/conf/templates/rails.conf0 @@ -0,0 +1,74 @@ +allowSymbolLink 1 +chrootMode 0 +enableScript 1 +restrained 1 +setUIDMode 2 +vhRoot $SERVER_ROOT/$VH_NAME/ +configFile $SERVER_ROOT/conf/vhosts/$VH_NAME/vhconf.conf + +virtualHostConfig { + enableGzip 1 + docRoot $VH_ROOT/public/ + + accessControl { + allow * + } + + hotlinkCtrl { + suffixes gif, jpeg, jpg + allowDirectAccess 1 + onlySelf 1 + enableHotlinkCtrl 0 + } + + rewrite { + enable 0 + logLevel 0 + } + + index { + useServer 0 + autoIndex 0 + indexFiles index.html + autoIndexURI /_autoindex/default.php + } + + accessLog $SERVER_ROOT/logs/$VH_NAME.access.log{ + logHeaders 3 + compressArchive 0 + useServer 0 + keepDays 30 + rollingSize 500M + } + + errorlog { + useServer 1 + } + + context / { + railsEnv 1 + maxConns 5 + location $VH_ROOT/ + type rails + accessControl + addDefaultCharset off + rewrite { + RewriteFile .htaccess + } + } + + expires { + enableExpires 1 + } + + awstats { + workingDir $VH_ROOT/awstats + awstatsURI /awstats/ + siteDomain localhost + siteAliases 127.0.0.1 localhost + updateMode 0 + updateInterval 86400 + updateOffset 0 + securedConn 0 + } +} diff --git a/config/litespeed/1.6.4.lh/conf/vhosts/Example/htgroup b/config/litespeed/1.6.4.lh/conf/vhosts/Example/htgroup new file mode 100755 index 0000000..5f9c0c8 --- /dev/null +++ b/config/litespeed/1.6.4.lh/conf/vhosts/Example/htgroup @@ -0,0 +1,4 @@ +group1: user1,user2, user3 +group2: +user: user8, test +group3: diff --git a/config/litespeed/1.6.4.lh/conf/vhosts/Example/htpasswd b/config/litespeed/1.6.4.lh/conf/vhosts/Example/htpasswd new file mode 100755 index 0000000..2b90853 --- /dev/null +++ b/config/litespeed/1.6.4.lh/conf/vhosts/Example/htpasswd @@ -0,0 +1,2 @@ +test:kF2EDBE2Ux8sQ +user1:SQtevcsBBnBPY diff --git a/config/litespeed/1.6.4.lh/conf/vhosts/Example/vhconf.conf b/config/litespeed/1.6.4.lh/conf/vhosts/Example/vhconf.conf new file mode 100644 index 0000000..8baa338 --- /dev/null +++ b/config/litespeed/1.6.4.lh/conf/vhosts/Example/vhconf.conf @@ -0,0 +1,115 @@ +docRoot $VH_ROOT/html/ +enableGzip 1 + + +context / { + allowBrowse 1 + location $DOC_ROOT/ + rewrite { + RewriteFile .htaccess + } +} + +context /docs/{ + allowBrowse 1 + location $SERVER_ROOT/docs/ +} + +context /protected/{ + required user test + authName Protected + allowBrowse 1 + location protected/ + realm SampleProtectedArea + + accessControl { + deny + allow * + } +} + +context /blocked/{ + allowBrowse 0 +} + +context /cgi-bin/{ + allowBrowse 1 + location $VH_ROOT/cgi-bin/ + type cgi +} + +expires { + enableExpires 1 +} + +index { + autoIndexURI /_autoindex/default.php + indexFiles index.html + autoIndex 0 + useServer 0 +} + +errorPage 404{ + url /error404.html +} + +errorlog $VH_ROOT/logs/error.log{ + logLevel DEBUG + rollingSize 10M + useServer 1 +} + +accessLog $VH_ROOT/logs/access.log{ + compressArchive 0 + logReferer 1 + keepDays 30 + rollingSize 10M + logUserAgent 1 + useServer 0 +} + +awstats { + updateInterval 86400 + workingDir $VH_ROOT/awstats + updateOffset 0 + siteDomain localhost + siteAliases 127.0.0.1 localhost + updateMode 0 + awstatsURI /awstats/ +} + +rewrite { + enable 0 + logLevel 0 +} + +hotlinkCtrl { + suffixes gif, jpeg, jpg + allowedHosts + allowDirectAccess 1 + enableHotlinkCtrl 0 + onlySelf 1 +} + +accessControl { + deny + allow * +} + +realm SampleProtectedArea { + userDB { + cacheTimeout 60 + maxCacheSize 200 + location conf/vhosts/Example/htpasswd + } + + groupDB { + cacheTimeout 60 + maxCacheSize 200 + location conf/vhosts/Example/htgroup + } +} + +general { + enableContextAC 0 +} diff --git a/config/litespeed/1.6.4.lh/conf/vhosts/Example/vhconf.conf0 b/config/litespeed/1.6.4.lh/conf/vhosts/Example/vhconf.conf0 new file mode 100644 index 0000000..8baa338 --- /dev/null +++ b/config/litespeed/1.6.4.lh/conf/vhosts/Example/vhconf.conf0 @@ -0,0 +1,115 @@ +docRoot $VH_ROOT/html/ +enableGzip 1 + + +context / { + allowBrowse 1 + location $DOC_ROOT/ + rewrite { + RewriteFile .htaccess + } +} + +context /docs/{ + allowBrowse 1 + location $SERVER_ROOT/docs/ +} + +context /protected/{ + required user test + authName Protected + allowBrowse 1 + location protected/ + realm SampleProtectedArea + + accessControl { + deny + allow * + } +} + +context /blocked/{ + allowBrowse 0 +} + +context /cgi-bin/{ + allowBrowse 1 + location $VH_ROOT/cgi-bin/ + type cgi +} + +expires { + enableExpires 1 +} + +index { + autoIndexURI /_autoindex/default.php + indexFiles index.html + autoIndex 0 + useServer 0 +} + +errorPage 404{ + url /error404.html +} + +errorlog $VH_ROOT/logs/error.log{ + logLevel DEBUG + rollingSize 10M + useServer 1 +} + +accessLog $VH_ROOT/logs/access.log{ + compressArchive 0 + logReferer 1 + keepDays 30 + rollingSize 10M + logUserAgent 1 + useServer 0 +} + +awstats { + updateInterval 86400 + workingDir $VH_ROOT/awstats + updateOffset 0 + siteDomain localhost + siteAliases 127.0.0.1 localhost + updateMode 0 + awstatsURI /awstats/ +} + +rewrite { + enable 0 + logLevel 0 +} + +hotlinkCtrl { + suffixes gif, jpeg, jpg + allowedHosts + allowDirectAccess 1 + enableHotlinkCtrl 0 + onlySelf 1 +} + +accessControl { + deny + allow * +} + +realm SampleProtectedArea { + userDB { + cacheTimeout 60 + maxCacheSize 200 + location conf/vhosts/Example/htpasswd + } + + groupDB { + cacheTimeout 60 + maxCacheSize 200 + location conf/vhosts/Example/htgroup + } +} + +general { + enableContextAC 0 +} diff --git a/config/litespeed/1.6.4.lh/entrypoint.sh b/config/litespeed/1.6.4.lh/entrypoint.sh new file mode 100644 index 0000000..93f87cf --- /dev/null +++ b/config/litespeed/1.6.4.lh/entrypoint.sh @@ -0,0 +1,50 @@ +#!/bin/bash +cd /var/www/vhosts/localhost/html +if [ ! -f "./wp-config.php" ]; then + # su -s /bin/bash www-data -c + COUNTER=0 + until [ "$(curl -v mysql:3306 2>&1 | grep native)" ]; + do + echo "Counter: ${COUNTER}" + COUNTER=$((COUNTER+1)) + if [ ${COUNTER} = 10 ]; then + echo '--- MySQL is starting, please wait... ---' + elif [ ${COUNTER} = 100 ]; then + echo '--- MySQL is timeout, exit! ---' + exit 1 + fi + sleep 1 + done + wp core download \ + --allow-root \ + --force + wp core config \ + --dbname="${MYSQL_DATABASE}" \ + --dbuser="${MYSQL_USER}" \ + --dbpass="${MYSQL_PASSWORD}" \ + --dbhost=mysql \ + --dbprefix="${WP_DB_PREFIX}" \ + --allow-root \ + --force + wp core install \ + --title="${WP_TITLE}" \ + --url="${DOMAIN}" \ + --admin_user="${ADMIN_USERNAME}" \ + --admin_email="${ADMIN_EMAIL}" \ + --admin_password="${ADMIN_PASSWORD}" \ + --skip-email \ + --allow-root + wp plugin install litespeed-cache \ + --activate \ + --allow-root +fi + + +#www_uid=$(stat -c "%u" /var/www/vhosts/localhost) +#if [ ${www_uid} -eq 0 ]; then +# #echo "./sites/localhost is owned by root, auto changing ownership of ./sites/localhost to uid 1000" +# chown 1000 /var/www/vhosts/localhost -R +#fi + +echo "WordPress installation finished." +exec "$@" \ No newline at end of file diff --git a/logs/.gitignore b/logs/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/logs/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/sites/.gitignore b/sites/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/sites/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore