Find the following two lines in the Apache configuration file, remove the comment #, and restart.
LoadModule deflate_module modules/mod_deflate.so
LoadModule expires_module modules/mod_expires.so
Create a new .htaccess in your website directory, add the following content:
< ;IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/png A2592000
ExpiresByType image/x-icon A2592000
ExpiresByType application /x-javascript A604800
ExpiresByType text/css A604800
</IfModule>
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/html text/css Image/gif image/jpeg image/png application/x-javascript
</IfModule>
Explain it. ExpiresByType is the MIME type to set the cache time of a specific file, A means access, and the number after A indicates the cache time after access. AddOutputFilterByType means to compress files according to the following MIME types. Here, gss compression is performed on css, html, gif, jpeg, png, JavaScript, etc. For more options, please refer to the apache manual.
Close ETag. The problem with Etag is that it is generated based on unique properties that identify the server on which the website is located. When the browser gets the page content from one server and then authenticates to another server, the ETag will not match. This is very common for websites that use server groups and handle requests. Write the following line in the configuration file:
FileETag none
If it is multi-server load balancing, you can set it to FileETag MTime Size, apache defaults to FileETag INode MTime Size, remove INode .
With the above settings, you can turn on compression and slow down.
The default mime type in iis7 does not contain all the suffix files. Like the pop
I believe that you are familiar with the Remote Desktop feature in Wi
If you are still calculating the capacity of a multi-channel memory of more than 100 yuan to improve
Server security has always been a top priority, especially since the viruses and T
25 optimization tips that make Apache performance significantly better
Interpretation of Content-Length in the Http Protocol
Apache load balancing settings: mod
Remotely modify the login password of the Serv-U FTP user.
Load balancing cluster technology
Maintenance and disassembly of server hardware system
Explain how IIS web server handles ASP.NET requests (Figure)
An example of IE access to IIS FTP timeout failure
Linux Mail Server Configuration Guide
Set up a server cluster based on Linux (2.6 kernel)
The solution to the 1067 error when the MySql starts under the windows platform and reflection
Remove Windows 7OEM Certificate and Key and re-import to activate OEM certificate method
Win10 how to turn off OneDrive Synchronization
How to turn off UAC control in Win10
How to manage USB devices with one button
Cleaning the computer every day to improve the boot speed is slow, Shenma is a cloud!
How to delete folders such as videos, pictures, documents and downloads under Windows 8 system
Experts share the Win 7 problem step recorder operation guide