Created
May 3, 2018 10:55
-
-
Save ferdousulhaque/d24e553f80f40594603cc6da3b050f0a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
As part of this mod_http2, mod_brotli, and mod_evasive have been provisioned. Please note that all these modules are passive and will not effect the online status of your site however each offers significant benefits. | |
mod_http2 Allows Easy Apache to server content over the H2 protocol. H2 is the new version of the HTTP protocol. It can offer significant performance increases because it natively support parallelized requests. This means that a browser can request the entire content of the site at once rather than having to send requests in sets of six. Another huge benefit of H2 is that it natively supports "pushing" content. This means that the server can send files to a browser before the browser even requests them, thus speeding up load times. This is typically only used for content that is used on every page of your site, such as themes. H2 has been enabled, however the setup for pushing certain items falls beyond our scope of support and I'd recommend talking to your site developer about leveraging using the H2PushResource directive within your sites .htaccess file. | |
mod_brotli Allows for Apache to compress data before it is sent. This allows for less information to be transmitted over the network, reducing the number of packets necessary to deliver content. If you are familiar with mod_deflate, then mod_brotli is a drop in replacement offering a much better compression algorithm. | |
mod_evasive Is a module for Apache that helps mitigate DDos Attacks. This module gives Apache the ability to has requests per IP and compare them to the most recent request for those IPs. This helps prevent an IP from flooding the server with excessive amounts of requests in attempt to crash it. The default settings for this module are fairly high so there is no worry that someone could get blocked simply by refreshing a page too much. | |
I have also provisioned some of the most common PHP extensions in order to make sure that there will be no dependency errors with any of the most comment CMS systems, or plugins. | |
I have also updated your Apache configuration itself. I have updated it so that it has proper settings for mod_brotli, mod_deflate and to have limits which reflect your available hardware in order to provide optimal performance for Apache. Your Apache configuration currently looks as follows. | |
KeepAliveTimeout 2 | |
MaxKeepAliveRequests 500 | |
ThreadsPerChild 25 | |
ServerLimit 16 | |
MaxRequestWorkers 400 | |
StartServers 6 | |
MinSpareThreads 150 | |
MaxSpareThreads 400 | |
MaxRequestsPerChild 10000 | |
# turn on the module for this directory | |
ExpiresActive on | |
# set default | |
ExpiresByType image/jpg "access plus 1 month" | |
ExpiresByType image/svg "access plus 1 month" | |
ExpiresByType image/gif "access plus 1 month" | |
ExpiresByType image/jpeg "access plus 1 month" | |
ExpiresByType image/png "access plus 1 month" | |
ExpiresByType text/css "access plus 1 month" | |
ExpiresByType text/javascript "access plus 1 month" | |
ExpiresByType application/javascript "access plus 1 month" | |
ExpiresByType application/x-shockwave-flash "access plus 1 month" | |
ExpiresByType text/css "now plus 1 month" | |
ExpiresByType image/ico "access plus 1 month" | |
ExpiresByType image/x-icon "access plus 1 month" | |
ExpiresByType text/html "access plus 600 seconds" | |
ExpiresDefault "access plus 2 days" | |
AddOutputFilterByType BROTLI_COMPRESS text/text text/html text/plain text/xml text/css application/x-javascript application/javascript |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment