Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 118375 - optionnal activation of mod_deflate in apache 2.0.x
Summary: optionnal activation of mod_deflate in apache 2.0.x
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Apache Team - Bugzilla Reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-09 02:55 UTC by Aurélien Requiem
Modified: 2006-06-06 08:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aurélien Requiem 2006-01-09 02:55:53 UTC
Hello

It could be usefull to have the possibility to enable easyly mod_deflate in apache2 (like mod_ssl).

I've produce a small patch to do this (gentoo in mind).

The file is : /etc/apache2/modules.d/01_mod_deflate.conf 
<IfDefine GZIP>
	# Load the module first
	<IfModule !mod_deflate.c>
		LoadModule deflate_module modules/mod_deflate.so
	</IfModule>

	<ifModule mod_deflate.c>
		AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript application/x-javascript text/xml text/css
		BrowserMatch ^Mozilla/4 gzip-only-text/html
		BrowserMatch ^Mozilla/4\.0[678] no-gzip
		BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
		Header append Vary User-Agent env=!dont-vary

		DeflateCompressionLevel 9
		
		DeflateFilterNote ratio
		DeflateFilterNote Input instream
		DeflateFilterNote Output outstream
		LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" mod_deflate: In:%{instream}n Out:%{outstream}n:%{ratio}npct." combined_deflate
	</IfModule>
</IfDefine>


Please, note that the logformat is especially used to work with awstats. You may also rename the define GZIP to DEFLATE. And then place it in /etc/conf.d/apache2.

Feel free to contact me.

Thanks
Comment 1 Ben XO 2006-05-04 08:15:13 UTC
very useful, thanks! i use this for apache 2.0 (stable)
Comment 2 Benedikt Böhm (RETIRED) gentoo-dev 2006-06-06 08:57:57 UTC
we try to stay to upstream config as close as possible, which does not include a default defalte config