How to add mod_deflate to apache without recompiling

How to add mod_deflate to apache without recompiling

Hi,

What is the best way to add moddeflate to the Apache server without recompiling the Apache? I have a Linux server (Centos) and I have to add the moddeflate module. How to add mod_deflate to apache without recompiling?

Thanks

View Answers

July 12, 2013 at 1:13 PM

Hi,

First of all you have to add LDFLAGS="-lz" in apr-1-config file.

Then you should compile the mod_deflate.c file. Use the following command to compile mod_deflate.c file.

cd /home/cpeasyapache/src/httpd-2.0.63/modules/filters/

/usr/local/apache/bin/apxs -i -c -Wl,lz mod_deflate.c

After that add the following code into httpd.conf file:

LoadModule deflate_module modules/mod_deflate.so

and then add the following line in httpd.conf:

<Location />
# Insert filter
SetOutputFilter DEFLATE

# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Don't compress images
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary

# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</Location>

After that restart the server. Your mod_deflate.c should be working now.

Thanks









Related Tutorials/Questions & Answers:
How to add mod_deflate to apache without recompiling
How to add mod_deflate to apache without recompiling  Hi, What is the best way to add moddeflate to the Apache server without recompiling the Apache... to add mod_deflate to apache without recompiling? Thanks   Hi, First
How to add Apache Commons IO in pom.xml file?
How to add Apache Commons IO in pom.xml file?  Hi, How to add the dependency of the Apache Commons IO library in the pom.xml file in a Java project? My Project is using the maven for dependency management and compilation
Advertisements
Add year to Date without using Calendar in java
Add year to Date without using Calendar in java  how could i add a year to a date function without using calendar functions
without ;
without ;  can u give me an example of a program without
without ;
without ;  can u give me an example of a program without
How to print a webpage without url and date in jsp ?
How to print a webpage without url and date in jsp ?  How to print a webpage without url and date in jsp
How to force cp to overwrite without confirmation
How to force cp to overwrite without confirmation  Hi, I am copying... all the files in the destination directory with new files. How can I use the cp command? How to force cp to overwrite without confirmation? Thanks   
how to get current date without system date
how to get current date without system date  is there any possiblity to get current date instead of system date in Java, as i dont want to change date in program and if i change date in OS automatically change in program also
how to print dot in python without newline
how to print dot in python without newline  Hi, I a debugging... to print 20 dots without new line. Is there any easy solution? how to print dot in python without newline? Can I use variable to decide no of times dot
how to print dot in python without newline
how to print dot in python without newline  Hi, I a debugging... places i want to print 20 dots without new line. Is there any easy solution? how to print dot in python without newline?ADS_TO_REPLACE_2 Can I use variable
how to reverse a string without changing its place
how to reverse a string without changing its place  how to reverse a string without changing its place   Hi Friend, Another way of reversing string: import java.util.*; public class ReverseString{ public static
How can we submit a form without a submit button?
How can we submit a form without a submit button?  How can we submit a form without a submit button
how to delete a row in sql without using delete command.
how to delete a row in sql without using delete command.  how to delete a row in sql without using delete command. thanks in advance
how to validate the telephone number without using jquery in html with javascript
how to validate the telephone number without using jquery in html with javascript  how to validate the telephone number without using jquery in html with javascript
How to add
How to add   Hi, I want to make a website which will recommend users books according to the genre selected by them. I am using PHP, JavaScript and mySQL. The problem is that there will me almost more than 100 books
how can i achieve multiple inheritance in java without using inheritance ?
how can i achieve multiple inheritance in java without using inheritance ?  how can i achieve multiple inheritance in java without using inheritance
How to Write to a File in Java without overwriting
Learn how to Write to a File in Java without overwriting in your Java program This tutorial teaches you how to write to a file in Java without overwriting... which already contains the data and our program will write to this file without
How do I tar a directory without retaining the directory structure?
How do I tar a directory without retaining the directory structure?  Hi, I want to create tar file without retaining the directory permission. How to do this? Thanks   Use tar czf ~/backup.tgz Thanks
How do I tar a directory without retaining the directory structure?
How do I tar a directory without retaining the directory structure?  Hi, I want to create tar file without retaining the directory permission. How to do this? Thanks   Use tar czf ~/backup.tgz Thanks
How to save form fields into the MySql Database without submit button in jsp?
How to save form fields into the MySql Database without submit button in jsp?  I want to store user inputs into the database using javasccript or ajax or jqury but without submit button. Form Contains three fields
how to test iphone app on iphone without developer program
how to test iphone app on iphone without developer program  Is it possible to test the iPhone application on different device without the UDID Key?   No, without the UDID Key no one test the application on iPhone
How to Make Money Online Without a Website
Its easy to Make Money Online Without a Website if you patience and little... without creating your own website. There lot's of skill required to register... by which you can earn money without creating your own website. Everyone around
how to build a colorful clock in JSP without using Flash.
how to build a colorful clock in JSP without using Flash.  I have to make a colorful clock using java programming or some API in a JSP page. Please send me a code for it as soon as possible
how to convert string to char array in java without using tochararray
how to convert string to char array in java without using tochararray  Hi, I want to convert the String object in java without the toChararray() function. how to convert string to char array in java without using
How to use Apache POI?
How to use Apache POI?  Can anyone tell me how to use Apache POI??I... how to implement.Please help me out.   Download zip file from the following link: http://download.nextag.com/apache/poi/release/bin/ Then put
How do I become a data scientist without coding experience in India?
How do I become a data scientist without coding experience in India?  ... for the tutorials to learn: How do I become a data scientist without coding... can learn the topic "How do I become a data scientist without coding
How do I become a data scientist without a PhD?
How do I become a data scientist without a PhD?  Hi, I am beginner... to learn: How do I become a data scientist without a PhD? Try to provide me good examples or tutorials links so that I can learn the topic "How do I
How to compile PHP file and provide it to user without code?
How to compile PHP file and provide it to user without code?  I have created a class in PHP, that contains some useful methods. Now I want to give... in asp.net instead of providing code file. How can I compile the PHP file and provide
how to remove tags in HTML without functionalities? - Java Beginners
how to remove tags in HTML without functionalities?  hi to all, I create an application for converting html to ppt in java. And in this i convert the text from html to ppt and i able to remove the HTML tags from .html code
how to access the object of one frame on clicking a button without using this keyword
how to access the object of one frame on clicking a button without using this keyword  import java.awt.*; import java.awt.event.*; class Mybuttons1 extends Frame { public static void main(String args[]) { Button b1
How can we implement Pop-up in JQuery without Plugin?
How can we implement Pop-up in JQuery without Plugin?  Hi Sir How can we Implement pop-up in JQuery without using plug-in. Please provide me code with detailed answer. Thanks in advance.   Hello Friend You need
How to declare a Combobox without using a string in its declaration?
How to declare a Combobox without using a string in its declaration?  What i mean to ask is how can i declare a combobox first and initialise... the examples and tutorials so far i haven't found any which tells me how to do
apache commons io 2.6 maven dependency to add to pom.xml
apache commons io 2.6 maven dependency to add to pom.xml  Hi, I am going to use few classes to apache commons io package. I want to add apache commons io 2.6 maven dependency libraries into my project. What is the code to add
apache commons io 2.6 maven dependency to add to pom.xml
apache commons io 2.6 maven dependency to add to pom.xml  Hi, I am going to use few classes to apache commons io package. I want to add apache commons io 2.6 maven dependency libraries into my project. What is the code to add
How to save data to excel with a 2.1 work sheet format without changing it?
How to save data to excel with a 2.1 work sheet format without changing it?  hi , i have done a program that allows user to inout data through jtable and save it to excel file then read it again .. the problem is , when data
how to add to numbers in java
how to add to numbers in java  how to add to numbers in java
How to add JTable in JPanel
How to add JTable in JPanel  How to add JTable in JPanel
How sql Queries possible in DAO without creating Database connections - Java Beginners
How sql Queries possible in DAO without creating Database connections  In DAO we are writting sql queries , how it is possible without creating and closing database connections
how to add dynamic data
how to add dynamic data  how to add dynamic data to an existing web application
how to add mulitiple projections
how to add mulitiple projections  how to add mulitiple projections and return them
How to display a record containing 30 fields in jsp without scrolling the page horizontally?
How to display a record containing 30 fields in jsp without scrolling the page horizontally?  I want to display records containing 30 fields in a table row.Is it possible in jsp without scrolling the page horizontally
how to retrieve data from database using combobox value without using request.getParameter in jsp - JSP-Servlet
how to retrieve data from database using combobox value without using request.getParameter in jsp  Answer pl
How to add BigDecimal in Java?
How to add BigDecimal in Java?  Hi, I have two BigDecimal variables. I want to add these two values. How to add BigDecimal in Java? Thanks   Hello, I will show you how you can add two BigDecimal? Suppose you have
how to add a file in GZIP
how to add a file in GZIP  Hi, how to add a file in GZIP using Java.   Hi, I have found a good referral site for How to Add a file in GZIP file format using Java. http://www.roseindia.net/java/examples/io
how to add plugins into eclipse
how to add plugins into eclipse  Hello, I have installed eclipse sdk 4.2M5 separately and tomcat server separately now i have to connect both for that i don't have server option in my eclipse and i m trying to add plugins but m
how to add scrollbar to JFrame
how to add scrollbar to JFrame  hello friends i am making a java application in which i have a frame to which i wanted to add scrollbars but when i add my panel to scrollpane and then add that scrollpane to JFrame than
how to add scrollbar to JFrame
how to add scrollbar to JFrame  hello friends i am making a java application in which i have a frame to which i wanted to add scrollbars but when i add my panel to scrollpane and then add that scrollpane to JFrame than
how to add scrollbar to JFrame
how to add scrollbar to JFrame  hello friends i am making a java application in which i have a frame to which i wanted to add scrollbars but when i add my panel to scrollpane and then add that scrollpane to JFrame than
how to add scrollbar to JFrame
how to add scrollbar to JFrame  hello friends i am making a java application in which i have a frame to which i wanted to add scrollbars but when i add my panel to scrollpane and then add that scrollpane to JFrame than
how to add scrollbar to JFrame
how to add scrollbar to JFrame  hello friends i am making a java application in which i have a frame to which i wanted to add scrollbars but when i add my panel to scrollpane and then add that scrollpane to JFrame than

Ads