Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm running CentOS 5.6 with cPanel.

I've rebuilt my apache to have deflate enabled. Here is my EasyApache Build Log:



...checking whether to enable mod_deflate... yes (default)

Within my http.conf there is no LoadModule mod_deflate, and there is no within my Modules/ Directory.

What am I doing wrong?


Ok, So I ran this command and it returned this:

/usr/local/apache/bin/httpd -M Loaded Modules: core_module (static) authn_file_module (static) authn_default_module (static) authz_host_module (static) authz_groupfile_module (static) authz_user_module (static) authz_default_module (static) auth_basic_module (static) include_module (static) filter_module (static) deflate_module (static) log_config_module (static) logio_module (static) env_module (static) expires_module (static) headers_module (static) unique_id_module (static) setenvif_module (static) version_module (static) proxy_module (static) proxy_connect_module (static) proxy_ftp_module (static) proxy_http_module (static) proxy_scgi_module (static) proxy_ajp_module (static) proxy_balancer_module (static) ssl_module (static) mpm_prefork_module (static) http_module (static) mime_module (static) status_module (static) autoindex_module (static) asis_module (static) info_module (static) suexec_module (static) cgi_module (static) negotiation_module (static) dir_module (static) actions_module (static) userdir_module (static) alias_module (static) rewrite_module (static) so_module (static) bwlimited_module (shared) security2_module (shared) Syntax OK

Which Suggests that deflate is running.

I added this to my httpd.conf with no luck.

AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript    application/javascript  application/xml

What needs to be added to get Deflate to work??


locked by HopelessN00b Mar 11 at 19:51

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

closed as off-topic by HopelessN00b Mar 11 at 19:51

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

no expert but didnt you just compile mod_deflate directly into apache so therefor its always on. –  Silverfire Aug 17 '11 at 2:04
Under Software / Services, did you see an icon called Optimize Website? –  quanta Aug 17 '11 at 2:10
No, I do not see Optimize Website in cPanel/WHM anywhere –  Moe Aug 17 '11 at 2:20
..and yes, it does turn out that mod_deflate is always on, but I cannot get it to work. –  Moe Aug 17 '11 at 3:01

2 Answers 2

up vote 0 down vote accepted

How are you determining that compression is ~not~ working?

Not 100% sure on this one, but I think you need to load the module in your conf, by compiling it in you are just compiling ~support~ for the module...

Try this:

# explicitly load the module
LoadModule deflate_module modules/

# Deflate output configuration
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript

# take care of silly browsers
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html


I get this error:httpd: Syntax error on line 32 of /usr/local/apache/conf/httpd.conf: module deflate_module is built-in and can't be loaded –  Moe Aug 17 '11 at 2:55
I didn't need to load the module, but the rest worked a treat. Thanks. –  Moe Aug 17 '11 at 3:09
glad I could help –  Sean Kimball Aug 17 '11 at 13:15

I think you want to add --enable-so to your configure options.


Not the answer you're looking for? Browse other questions tagged or ask your own question.