Apache Web Optimization: Web page compression, Web cache (contains the source package and the capture tool)

Source: Internet
Author: User

Web compression: Use the GZIP module in Apache in your Linux system. You can use the GZIP compression algorithm to compress the contents of Web pages published by the Apache server before transferring them to the client browser, which can speed up the loading of web pages after compression.


Web cache: Page caching is a part of the page cache that will not change very often, and the next time the browser accesses these pages again, it does not need to download the pages again, thus increasing the user's access speed


Apache Package: Https://pan.baidu.com/s/1hxWYjihLKYMRZ_Ev99v4qQ Password: 7HL7

Grab Bag tool and Environment pack: Https://pan.baidu.com/s/1fTX5BiBz6d1E9xNOL1lb1A Password: fzms


Lab environment: A Linux server with IP address 192.168.100.222

A win 7 client for access with an IP address of 192.168.100.3


1, uninstall the server's own httpd service, perform manual installation, and then attach the downloaded installation package to the Linux server, which we need to use a httpd source package, two APR toolkit


2. Unzip the three packages into the OPT directory


3, put two kits in the httpd directory, so as to be effective

Then install some of the environment packages required by the httpd

See the end of complete to indicate a successful installation


4, the environment after the installation of the switch to the httpd-2.4.2 directory, you can see the Configure this executable file, in the execution of the file to add the required compression module and cache module, (these two must be added, otherwise the service can not be executed)

Perform a make && make install command after the file installation is complete to turn the file into an executable file, and if you do not have this command, you can install it in RPM.

The path to the startup script is then placed under the specified path

Enter this script file, insert a script note at the beginning, and save the exit after completion


5, then we check the permissions of this file, found that it is not an executable file, so give it a execute permission to make it an executable file

Using Chkconfig--list to view the HTTPD service discovery is not within the scope of the system, so the httpd service needs to be added in


6. Create a soft link to the Apache master configuration file to facilitate subsequent configuration

Enter the master profile to change the listening address to its own server address while defining a full qualified domain name

Turn on the compression module and the cache module, where the filter module and HTTPD head are turned on by default, and for insurance purposes you can check


7, the compression module and the cache module can be defined at the end of the file to define these two modules detailed procedures are described in the diagram, it is important to note the writing format

After the file configuration is complete, you can execute apachectl-t in the/usr/local/httpd/bin/directory to see if there is an error in the file configuration, and syntax OK indicates that there is no error in the file configuration.

When everything is done, we can turn on the service and shut down the firewall for other clients to access



8, finally we open a Win7 to test, here can use the Grab Kit tool to view the details, if you want to install this grab tool on Win7 also need to install an environment package, these two packages I have at the beginning to give the link, there is need to download the use, But if you're on a win10 system, you don't need to install the environment pack.

After the installation is complete we open the Capture tool, then access the previously created Web page, through the capture tool can be seen, which uses the gzip compression format, the cache time of 50 seconds

Apache Web Optimization: Web page compression, Web cache (contains the source package and the capture tool)

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.