Posted on

Windspeed Setup

The server needs to have run at minimum 24 hours before the mysql tuning can be performed. Other steps can be performed prior.

MySQL tuning

Direct SSH steps:wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl perl mysqltuner.pl

Make a note to the side about the recommended settings provided and adjust values from the tuner in /etc/my.cnf

service mysql restart

Upgrade MySQL to MariaDB 10.0 or newer.

Apache configuration

From WHM, go to Service Configuration > Apache Configuration > Global Configuration. Adjust the following values accordingly:

Start Servers - 15
Minimum Spare Servers - 15
Maximum Spare Servers - 30
Server Limit - 1024
Max Request Workers - 300
Max Connections per Child - 15000

PHP handler “fcgi” will also help.

.htaccess modification

Add the following to the end of the .htaccess files for domains on the server:

## SPEEDBOOST ##
# Use Mod_deflate to compress static files
<ifmodule mod_deflate.c>
<filesmatch "\.(js|css|ico|txt|htm|html|php)$">
SetOutputFilter DEFLATE
</filesmatch>
</ifmodule>
# Speed up caching
FileETag MTime Size
# Expires
ExpiresActive On
ExpiresDefault "access plus 366 days"
# Future Expires Headers
<filesmatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Expires "Sat, 27 Dec 2014 23:59:59 GMT"
</filesmatch>
<IfModule mod_headers.c>
  <FilesMatch "\.(js|css|xml|gz)$">
    Header append Vary: Accept-Encoding
  </FilesMatch>
</IfModule>
AddDefaultCharset UTF-8
DefaultLanguage en-US
SetEnv TZ America/Chicago
ServerSignature Off
<ifmodule mod_php4.c>
 php_value zlib.output_compression 16386
</ifmodule>
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 2 days"
</IfModule>
## EXPIRES CACHING ##
## Compression ##
# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
<FilesMatch "\.(flv|gif|jpg|jpeg|png|ico|swf|js|css|pdf)$">
Header set Cache-Control max-age=2592000?
</FilesMatch>
<ifModule mod_gzip.c>
  mod_gzip_on Yes
  mod_gzip_dechunk Yes
  mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
  mod_gzip_item_include handler ^cgi-script$
  mod_gzip_item_include mime ^text/.*
  mod_gzip_item_include mime ^application/x-javascript.*
  mod_gzip_item_exclude mime ^image/.*
  mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>
## Compression ##
## SPEEDBOOST ##