Web page Compression
The speed of the site is determined by a number of factors, including the response speed of the application, network bandwidth, server performance, and the network transfer speed between the clients. One of the most important factors is the response speed of Apache itself, when the site performance is poor, the first thing to deal with is to improve the execution speed of Apache, using Web compression can increase the speed of the application. And most importantly, there is no cost at all, just a slight increase in server CPU usage.
Web cache
The Web cache is a page cache that is often not changed or rarely changes, and the next time the browser accesses these pages again, it does not need to download the pages again, thereby increasing the user's access speed.
Lab Environment:
On the virtual machine Lniux6.5 system, manually compile and install Apache services
IP Address: 192.168.100.50
Here are the packages needed to build the Apache service, and the Fiddler grab Kit
Link: https://pan.baidu.com/s/12tL7nGtEUzE-h8wZLES_Zw Password: 3hun
Since the Apache service is already installed on the Linux6.5 system, remove the original package, and manually compile and install the Apache module compression and cache settings
1.yum Remove httpd
2. Create mount point/aaa mount the shared folder that contains the Apache software package
3. Unpack the package into the/opt/directory
Tar xzvf http-2.4.2.tar.gz-c/opt/
Tar xzvf apr-1.4.6.tar.gz-c/opt/
Tar xzvf apr-util-1.4.1.tar.gz-c/opt/
4. Copy the extracted files to the/opt/httpd-2.4.2/srclib/directory
5. Install the compilation environment
Yum install gcc gcc-c++ pcre pcre-devel zlib-devel–y
6. Manually compile the installation, turn on page compression and Web cache module
7. Installation
Make && make install
8. Reverse filter the contents of the/usr/local/httpd/bin/apache with "#" and bring the new file to/ETC/INIT.D/HTTPD
9. Edit Vim/etc/init.d/httpd, add at the beginning
10. Change the/etc/init.d/httpd file permissions, have execute permissions, and boot from the boot
11. Establish a soft connection for easy management
ln-s/usr/local/httpd/conf/httpd.conf/etc/httpd.conf (Note: A soft connection uses an absolute path)
12 Editing the Apache master configuration file vim/etc/httpd.conf
13. Execute Apache script to see if the syntax is correct
14. Edit the Master profile vim/etc/httpd.conf, turn on the authentication module
LoadModule deflate_module modules/mod_deflate.so//Compression module
LoadModule headers_module modules/mod_headers.so//Request Header Module
LoadModule filter_module modules/mod_filter.so//filter module
LoadModule expires_module modules/mod_expires.so//Open Cache module
15. Add module compression and module cache files at the end of the configuration file
16 Verifying configuration files and configuration
17. Restart the Apache service, turn off the firewall and secure xxx
18. Install the Fiddler capture software on the WINDOS7 virtual machine
19. Visit the Apache website on Win7 and use the Grab kit tool to view
Apache Web optimization, Web page compression and Web caching technology