|
|
|
@ -57,6 +57,8 @@ |
|
|
|
|
<li><a href="#11.permissions-check">Removing files download permissions check</a></li> |
|
|
|
|
<li><a href="#12.MySQL-compression">MySQL/MariaDB compression</a></li> |
|
|
|
|
<li><a href="#13.increasing-php-limits">Increasing PHP limits</a></li> |
|
|
|
|
<li><a href="#14.Enable-cache">Enable cache</a></li> |
|
|
|
|
<li><a href="#15.Enable-text-compression">Enable text compression</a></li> |
|
|
|
|
</ol> |
|
|
|
|
|
|
|
|
|
<h2><a name="1.Using-XCache"></a>1. Using opcaches</h2> |
|
|
|
@ -568,6 +570,78 @@ Changing CLIENT_COMPRESS will only have a positive impact if the CPU |
|
|
|
|
have a larger portal than anyone else, you probably need to give it more |
|
|
|
|
care than anyone else. |
|
|
|
|
</p> |
|
|
|
|
<h2><a name="14.Enable-cache"></a>Enable cache</h2> |
|
|
|
|
<pre> |
|
|
|
|
# Enable cache |
|
|
|
|
<IfModule mod_expires.c> |
|
|
|
|
ExpiresActive On |
|
|
|
|
|
|
|
|
|
# Images |
|
|
|
|
ExpiresByType image/jpeg "access plus 1 year" |
|
|
|
|
ExpiresByType image/gif "access plus 1 year" |
|
|
|
|
ExpiresByType image/png "access plus 1 year" |
|
|
|
|
ExpiresByType image/webp "access plus 1 year" |
|
|
|
|
ExpiresByType image/svg+xml "access plus 1 year" |
|
|
|
|
ExpiresByType image/x-icon "access plus 1 year" |
|
|
|
|
|
|
|
|
|
# Video |
|
|
|
|
ExpiresByType video/webm "access plus 1 year" |
|
|
|
|
ExpiresByType video/mp4 "access plus 1 year" |
|
|
|
|
ExpiresByType video/mpeg "access plus 1 year" |
|
|
|
|
|
|
|
|
|
# Fonts |
|
|
|
|
ExpiresByType font/ttf "access plus 1 year" |
|
|
|
|
ExpiresByType font/otf "access plus 1 year" |
|
|
|
|
ExpiresByType font/woff "access plus 1 year" |
|
|
|
|
ExpiresByType font/woff2 "access plus 1 year" |
|
|
|
|
ExpiresByType application/font-woff "access plus 1 year" |
|
|
|
|
|
|
|
|
|
# CSS, JavaScript |
|
|
|
|
ExpiresByType text/css "access plus 1 year" |
|
|
|
|
ExpiresByType text/javascript "access plus 1 year" |
|
|
|
|
ExpiresByType application/javascript "access plus 1 year" |
|
|
|
|
|
|
|
|
|
# Others |
|
|
|
|
ExpiresByType application/pdf "access plus 1 year" |
|
|
|
|
ExpiresByType image/vnd.microsoft.icon "access plus 1 year" |
|
|
|
|
</IfModule> |
|
|
|
|
</IfModule> |
|
|
|
|
</pre> |
|
|
|
|
|
|
|
|
|
<h2><a name="15.Enable-text-compression"></a>Enable text compression</h2> |
|
|
|
|
<pre> |
|
|
|
|
# Enable text compression |
|
|
|
|
<IfModule mod_deflate.c> |
|
|
|
|
# Compress HTML, CSS, JavaScript, Text, XML and fonts |
|
|
|
|
AddOutputFilterByType DEFLATE application/javascript |
|
|
|
|
AddOutputFilterByType DEFLATE application/rss+xml |
|
|
|
|
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject |
|
|
|
|
AddOutputFilterByType DEFLATE application/x-font |
|
|
|
|
AddOutputFilterByType DEFLATE application/x-font-opentype |
|
|
|
|
AddOutputFilterByType DEFLATE application/x-font-otf |
|
|
|
|
AddOutputFilterByType DEFLATE application/x-font-truetype |
|
|
|
|
AddOutputFilterByType DEFLATE application/x-font-ttf |
|
|
|
|
AddOutputFilterByType DEFLATE application/x-javascript |
|
|
|
|
AddOutputFilterByType DEFLATE application/xhtml+xml |
|
|
|
|
AddOutputFilterByType DEFLATE application/xml |
|
|
|
|
AddOutputFilterByType DEFLATE font/opentype |
|
|
|
|
AddOutputFilterByType DEFLATE font/otf |
|
|
|
|
AddOutputFilterByType DEFLATE font/ttf |
|
|
|
|
AddOutputFilterByType DEFLATE image/svg+xml |
|
|
|
|
AddOutputFilterByType DEFLATE image/x-icon |
|
|
|
|
AddOutputFilterByType DEFLATE text/css |
|
|
|
|
AddOutputFilterByType DEFLATE text/html |
|
|
|
|
AddOutputFilterByType DEFLATE text/javascript |
|
|
|
|
AddOutputFilterByType DEFLATE text/plain |
|
|
|
|
AddOutputFilterByType DEFLATE text/xml |
|
|
|
|
|
|
|
|
|
# Remove browser bugs (only needed for really old browsers) |
|
|
|
|
BrowserMatch ^Mozilla/4 gzip-only-text/html |
|
|
|
|
BrowserMatch ^Mozilla/4\.0[678] no-gzip |
|
|
|
|
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html |
|
|
|
|
Header append Vary User-Agent |
|
|
|
|
</IfModule> |
|
|
|
|
</pre> |
|
|
|
|
<hr /> |
|
|
|
|
<h2>Authors</h2> |
|
|
|
|
<ul> |
|
|
|
|