Skip to content

Commit

Permalink
Add OLS to OLS Enterprise conversion scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
meramsey committed Sep 26, 2021
1 parent 2070dca commit 01e6a96
Show file tree
Hide file tree
Showing 6 changed files with 1,762 additions and 0 deletions.
148 changes: 148 additions & 0 deletions ols2ent/ httpd_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
<?xml version="1.0" encoding="UTF-8"?>
<httpServerConfig>
<serverName>$HOSTNAME</serverName>
<user>nobody</user>
<group>nobody</group>
<priority>0</priority>
<chrootPath>/</chrootPath>
<enableChroot>0</enableChroot>
<inMemBufSize>120M</inMemBufSize>
<swappingDir>/tmp/lshttpd/swap</swappingDir>
<autoFix503>1</autoFix503>
<loadApacheConf>1</loadApacheConf>
<autoReloadApacheConf>0</autoReloadApacheConf>
<apacheConfFile>/usr/local/lsws/conf/httpd.conf</apacheConfFile>
<apachePortOffset>0</apachePortOffset>
<apacheIpOffset>0</apacheIpOffset>
<phpSuExec>2</phpSuExec>
<phpSuExecMaxConn>15</phpSuExecMaxConn>
<mime>$SERVER_ROOT/conf/mime.properties</mime>
<showVersionNumber>0</showVersionNumber>
<autoUpdateInterval>86400</autoUpdateInterval>
<autoUpdateDownloadPkg>1</autoUpdateDownloadPkg>
<adminEmails>admin@localhost</adminEmails>
<logging>
<log>
<fileName>$SERVER_ROOT/logs/error.log</fileName>
<logLevel>DEBUG</logLevel>
<debugLevel>0</debugLevel>
<rollingSize>10M</rollingSize>
<enableStderrLog>1</enableStderrLog>
<enableAioLog>1</enableAioLog>
</log>
<accessLog>
<fileName>$SERVER_ROOT/logs/access.log</fileName>
<rollingSize>10M</rollingSize>
<keepDays>30</keepDays>
<compressArchive>0</compressArchive>
</accessLog>
</logging>
<indexFiles>index.html, index.php</indexFiles>
<htAccess>
<allowOverride>0</allowOverride>
<accessFileName>.htaccess</accessFileName>
</htAccess>
<expires>
<enableExpires>1</enableExpires>
<expiresByType>image/*=A604800, text/css=A604800, application/x-javascript=A604800, application/javascript=A604800,font/*=A604800,application/x-font-ttf=A604800</expiresByType>
</expires>
<tuning>
<maxConnections>10000</maxConnections>
<maxSSLConnections>10000</maxSSLConnections>
<connTimeout>300</connTimeout>
<maxKeepAliveReq>10000</maxKeepAliveReq>
<keepAliveTimeout>5</keepAliveTimeout>
<sndBufSize>0</sndBufSize>
<rcvBufSize>0</rcvBufSize>
<maxReqURLLen>8192</maxReqURLLen>
<maxReqHeaderSize>16380</maxReqHeaderSize>
<maxReqBodySize>500M</maxReqBodySize>
<maxDynRespHeaderSize>8K</maxDynRespHeaderSize>
<maxDynRespSize>500M</maxDynRespSize>
<maxCachedFileSize>4096</maxCachedFileSize>
<totalInMemCacheSize>20M</totalInMemCacheSize>
<maxMMapFileSize>256K</maxMMapFileSize>
<totalMMapCacheSize>40M</totalMMapCacheSize>
<useSendfile>1</useSendfile>
<useAIO>1</useAIO>
<AIOBlockSize>4</AIOBlockSize>
<enableGzipCompress>1</enableGzipCompress>
<compressibleTypes>text/*,application/x-javascript,application/javascript,application/xml,image/svg+xml,application/rss+xml</compressibleTypes>
<enableDynGzipCompress>1</enableDynGzipCompress>
<gzipAutoUpdateStatic>1</gzipAutoUpdateStatic>
</tuning>
<security>
<fileAccessControl>
<followSymbolLink>1</followSymbolLink>
<checkSymbolLink>0</checkSymbolLink>
<requiredPermissionMask>000</requiredPermissionMask>
<restrictedPermissionMask>000</restrictedPermissionMask>
</fileAccessControl>
<perClientConnLimit>
<staticReqPerSec>0</staticReqPerSec>
<dynReqPerSec>0</dynReqPerSec>
<outBandwidth>0</outBandwidth>
<inBandwidth>0</inBandwidth>
<softLimit>10000</softLimit>
<hardLimit>10000</hardLimit>
<gracePeriod>15</gracePeriod>
<banPeriod>300</banPeriod>
</perClientConnLimit>
<CGIRLimit>
<maxCGIInstances>200</maxCGIInstances>
<minUID>11</minUID>
<minGID>10</minGID>
<priority>0</priority>
<CPUSoftLimit>300</CPUSoftLimit>
<CPUHardLimit>600</CPUHardLimit>
<memSoftLimit>1450M</memSoftLimit>
<memHardLimit>1500M</memHardLimit>
<procSoftLimit>1400</procSoftLimit>
<procHardLimit>1450</procHardLimit>
</CGIRLimit>
<censorshipControl>
<enableCensorship>0</enableCensorship>
<logLevel>0</logLevel>
<defaultAction>deny,log,status:403</defaultAction>
<scanPOST>1</scanPOST>
</censorshipControl>
<accessDenyDir>
<dir>/</dir>
<dir>/etc/*</dir>
<dir>/dev/*</dir>
<dir>$SERVER_ROOT/conf/*</dir>
<dir>$SERVER_ROOT/admin/conf/*</dir>
</accessDenyDir>
<accessControl>
<allow>ALL</allow>
</accessControl>
</security>
<phpConfig>
<maxConns>35</maxConns>
<env>PHP_LSAPI_CHILDREN=35</env>
<initTimeout>60</initTimeout>
<retryTimeout>0</retryTimeout>
<pcKeepAliveTimeout>1</pcKeepAliveTimeout>
<respBuffer>0</respBuffer>
<extMaxIdleTime>60</extMaxIdleTime>
<memSoftLimit>2047M</memSoftLimit>
<memHardLimit>2047M</memHardLimit>
<procSoftLimit>400</procSoftLimit>
<procHardLimit>500</procHardLimit>
</phpConfig>
<railsDefaults>
<maxConns>5</maxConns>
<env>LSAPI_MAX_IDLE=60</env>
<initTimeout>180</initTimeout>
<retryTimeout>0</retryTimeout>
<pcKeepAliveTimeout>60</pcKeepAliveTimeout>
<respBuffer>0</respBuffer>
<backlog>50</backlog>
<runOnStartUp>1</runOnStartUp>
<priority>3</priority>
<memSoftLimit>2047M</memSoftLimit>
<memHardLimit>2047M</memHardLimit>
<procSoftLimit>400</procSoftLimit>
<procHardLimit>500</procHardLimit>
</railsDefaults>
</httpServerConfig>
32 changes: 32 additions & 0 deletions ols2ent/example.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<VirtualHost replacement_IP:80>
ServerName replacement_domain
ServerAlias replacement_alias
ServerAdmin replacement_adminemail
SuexecUserGroup replacement_user replacement_group
DocumentRoot replacement_docroot
CustomLog replacement_log combined
php_my_admin_directive
AddHandler application/x-httpd-replacement_php_ver .php .php7 .phtml
<IfModule LiteSpeed>
CacheRoot lscache
</IfModule>

</VirtualHost>

<VirtualHost replacement_IP:443>
ServerName replacement_domain
ServerAlias replacement_alias
ServerAdmin replacement_adminemail
SuexecUserGroup replacement_user replacement_group
DocumentRoot replacement_docroot
CustomLog replacement_log combined
php_my_admin_directive
<IfModule LiteSpeed>
CacheRoot lscache
</IfModule>
SSLEngine on
SSLVerifyClient none
SSLCertificateFile replacement_cert_file
SSLCertificateKeyFile replacement_key_file
AddHandler application/x-httpd-replacement_php_ver .php .php7 .phtml
</VirtualHost>
86 changes: 86 additions & 0 deletions ols2ent/httpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
ServerRoot "/usr/local/lsws"

Listen 0.0.0.0:80
Listen [::]:80
Listen 0.0.0.0:443
Listen [::]:443

User nobody
Group nobody
ServerAdmin root@localhost

<Directory />
AllowOverride none
</Directory>

<Directory /var/www/>
AllowOverride All
Options +Includes -Indexes +ExecCGI
</Directory>

DirectoryIndex index.php index.html

<Files ".ht*">
Require all denied
</Files>

ErrorLog "/usr/local/lsws/logs/error.log"
LogLevel warn

LogFormat '%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"' combined
CustomLog "/usr/local/lsws/logs/access.log" combined


AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

AddDefaultCharset UTF-8

<IfModule mime_magic_module>
MIMEMagicFile conf/magic
</IfModule>

EnableSendfile on

SSLProtocol all -SSLv3 -TLSv1
SSLHonorCipherOrder on

SSLCipherSuite ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:HIGH:!EDH-RSA-DES-CBC3-SHA:!DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4

<IfModule Litespeed>
CacheRoot /usr/local/lsws/cachedata/
</IfModule>

Include /usr/local/lsws/conf/vhosts/*

<VirtualHost replacement_IP:80>
ServerName replacement_servername
ServerAdmin replacement_adminemail
SuexecUserGroup replacement_user replacement_group
DocumentRoot /var/www/html/
CustomLog /usr/local/lsws/logs/wordpress-access.log combined
Alias /phpmyadmin/ /var/www/phpmyadmin/
AddHandler application/x-httpd-php73 .php .php7 .phtml
<IfModule LiteSpeed>
CacheRoot lscache
</IfModule>
</VirtualHost>

<VirtualHost replacement_IP:443>
ServerName replacement_servername
ServerAdmin replacement_adminemail
SuexecUserGroup replacement_user replacement_group
DocumentRoot /var/www/html/
CustomLog /usr/local/lsws/logs/wordpress-access.log combined
Alias /phpmyadmin/ /var/www/phpmyadmin/
<IfModule LiteSpeed>
CacheRoot lscache
</IfModule>
SSLEngine on
SSLVerifyClient none
SSLCertificateFile replacement_cert_file
SSLCertificateKeyFile replacement_key_file
AddHandler application/x-httpd-php73 .php .php7 .phtml
</VirtualHost>
Loading

0 comments on commit 01e6a96

Please sign in to comment.