Solve the problem that "an unknown filter was not added: deflate" is no longer available for the specified network name in Apache error.

Source: Internet
Author: User

Today, I suddenly found that my website could not be accessed. I went to the server to check whether Apache was in the starting status. After restarting, I could access the website normally.
Check Apache error logs and find many of the following error messages:
The specified network name is no longer available
[Error] An unknown filter was not added: deflate

This error occurs because deflate is used in the VM configuration file, but the mod_deflate module is not used in Apache.

For example, the VM configuration includes:

<Location/>
Addoutputfilterbytype deflate text/HTML text/XML text/plain
</Location>

OK. After finding the cause, we can solve the problem. Let Apache load the mod_deflate module.

We recommend that you use mod_deflate to compress apache2. mod_gzip is suitable for apache1.x.

1. Search for the deflate Module
Finding/home/test/httpd-2.0.50-name mod_deflate.c

2. Install mod_deflate
CD/home/test/httpd-2.0.50/modules/Filters
/Usr/local/apache2/bin/apxs-I-c-A/home/test/httpd-2.0.50/modules/filters/mod_deflate.c

Apxs command parameters:
-I this option indicates that you need to install one or more dynamic shared objects to the modules directory of the server.
-A this option automatically adds a loadmodule row to the httpd. conf file to activate this module. Or, if this row already exists, it is enabled.
-C this option indicates that the compilation operation is required. It will first compile the C source program (. c) files is the target code file (. o), and then connect the target code and other target code files in files (. O and. a) To generate a dynamic shared object dsofile. If the-O option is not specified, the output file name is inferred from the first file name in files, that is, the default file name is mod_name.so.
 
To install Apache, add -- enable-headers -- enable-deflate.

 

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.