{"id":137,"date":"2009-03-24T13:56:50","date_gmt":"2009-03-24T21:56:50","guid":{"rendered":"http:\/\/www.demonclownbaby.com\/?p=137"},"modified":"2009-03-24T14:00:38","modified_gmt":"2009-03-24T22:00:38","slug":"adding-mod_deflate-to-apache-as-a-shared-object","status":"publish","type":"post","link":"http:\/\/knoledge.org\/demon\/2009\/03\/24\/adding-mod_deflate-to-apache-as-a-shared-object\/","title":{"rendered":"Adding mod_deflate to Apache as a shared object"},"content":{"rendered":"<p>So you want to add mod_deflate to Apache but without recompiling it.  You can compile just that module and add it dynamically.<\/p>\n<p>What we need to do is create mod_deflate.so where the .so stands for shared object.<\/p>\n<p>First find where apxs and apr-config are located.  For me it was in \/usr\/local\/apache\/bin<\/p>\n<p>Edit the apr-config file and change this line:<\/p>\n<p>LDFLAGS=&quot;&quot;<\/p>\n<p>to this one:<\/p>\n<p>LDFLAGS=&quot;-lz&quot;<\/p>\n<p>Then go to your Apache source files (or download them off of apache.org).  Go to modules\/filters and find the mod_deflate.c file.<\/p>\n<p>Run this:<\/p>\n<p>apxs -c mod_deflate.c<\/p>\n<p>You should now have these files:<\/p>\n<p>mod_deflate.c<br \/>\nmod_deflate.dsp<br \/>\nmod_deflate.exp<br \/>\nmod_deflate.la<br \/>\nmod_deflate.lo<br \/>\nmod_deflate.o<br \/>\nmod_deflate.slo<\/p>\n<p>Notice there is no mod_deflate.so file there.  This is where I got stuck.  Fortunately on Apache&#8217;s site they indicate to do this:<\/p>\n<p>apxs -i -a -n deflate mod_deflate.la<\/p>\n<p>That creates the mod_deflate.so file, puts it in the modules folder, and adds this to your httpd.conf:<\/p>\n<p>LoadModule deflate_module     modules\/mod_deflate.so<\/p>\n<p>There you go.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So you want to add mod_deflate to Apache but without recompiling it. You can compile just that module and add it dynamically. What we need to do is create mod_deflate.so where the .so stands for shared object. First find where apxs and apr-config are located. For me it was in \/usr\/local\/apache\/bin Edit the apr-config file [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[18],"tags":[],"_links":{"self":[{"href":"http:\/\/knoledge.org\/demon\/wp-json\/wp\/v2\/posts\/137"}],"collection":[{"href":"http:\/\/knoledge.org\/demon\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/knoledge.org\/demon\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/knoledge.org\/demon\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/knoledge.org\/demon\/wp-json\/wp\/v2\/comments?post=137"}],"version-history":[{"count":6,"href":"http:\/\/knoledge.org\/demon\/wp-json\/wp\/v2\/posts\/137\/revisions"}],"predecessor-version":[{"id":143,"href":"http:\/\/knoledge.org\/demon\/wp-json\/wp\/v2\/posts\/137\/revisions\/143"}],"wp:attachment":[{"href":"http:\/\/knoledge.org\/demon\/wp-json\/wp\/v2\/media?parent=137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/knoledge.org\/demon\/wp-json\/wp\/v2\/categories?post=137"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/knoledge.org\/demon\/wp-json\/wp\/v2\/tags?post=137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}