Apache Web optimization, Web page compression and Web caching technology

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.