Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 28th December 2009, 21:34
bpr bpr is offline
Junior Member
Join Date: Dec 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Angry Mod_trim & Deflate & VBulletin Board Software

Hi guys,
I would like to use mod_trim. You can find the mod here:

My OS: OpenSuse 11.2

I installed Apache and so on with yast - so i didnt compile it on my own.
Anyway, i was first of all installtin apache-devel, so that i can use apxs2 to compile my mod_trim package.

after that I did as it was said on the original website.

I put my mod_trim.so into


After that I did
a2enmod trim,
a check in
proofed, that it was written inside.

I starteted editing my vhost.
I also want to use mod_deflate. So I was doing as followed:

<Location />
130                 #SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
131                 SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
132                 SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
133                 SetEnvIfNoCase Request_URI \.avi$ no-gzip dont-vary
134                 SetEnvIfNoCase Request_URI \.mov$ no-gzip dont-vary
135                 SetEnvIfNoCase Request_URI \.mp3$ no-gzip dont-vary
136                 SetEnvIfNoCase Request_URI \.mp4$ no-gzip dont-vary
137                 SetEnvIfNoCase Request_URI \.rm$ no-gzip dont-vary
139                 AddOutputFilterByType DEFLATE;TRIM text/plain
140                 AddOutputFilterByType DEFLATE text/xml
141                 AddOutputFilterByType DEFLATE;TRIM text/html
142                 AddOutputFilterByType DEFLATE;TRIM application/xhtml+xml
143                 AddOutputFilterByType DEFLATE;TRIM text/javascript
144                 AddOutputFilterByType DEFLATE;TRIM text/css
145                 AddOutputFilterByType DEFLATE application/xml
146                 AddOutputFilterByType DEFLATE image/svg+xml
147                 AddOutputFilterByType DEFLATE image/gif
148                 AddOutputFilterByType DEFLATE image/jpg
149                 AddOutputFilterByType DEFLATE image/jpeg
150                 AddOutputFilterByType DEFLATE image/png
151                 AddOutputFilterByType DEFLATE application/rss+xml
152                 AddOutputFilterByType DEFLATE application/atom_xml
153                 AddOutputFilterByType DEFLATE;TRIM application/x-javascript
154                 AddOutputFilterByType DEFLATE;TRIM application/x-httpd-php
155                 AddOutputFilterByType DEFLATE application/x-httpd-fastphp
156                 AddOutputFilterByType DEFLATE application/x-httpd-eruby
158         </Location>
159         DeflateFilterNote Input input_info
160         DeflateFilterNote Output output_info
161         DeflateFilterNote Ratio ratio_info
162         LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate
163         CustomLog /var/log/apache2/deflate_log deflate
I restarted my apache and I tried my website.
But nothing special happend. Actually nothing happend, the whitespaces were still inside my source code.

I tried to load my mod_trim on my own in my vhosts as followed:

LoadModule trim_modul /usr/lib64/apache2-prefork/mod_trim.so

I restarted an apache said, it will ignore that line, because trim is already loaded. So I was shure, that I was successfully implementing my self compiled mod_trim.

I am running an VBulltein Board and I would like to compress my Output, before the user gets it.

1. I want to compress the data, with deflate
2. I want to remove the whitespaces

Nevertheless its not working at all.
Here an example of my url:


and it will show the forum homepage.

When I look into the source code, provided by firefox:

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
Which means, that the mime-typ ist html. (I know, utf-8, but the board is not published yet, so its on my todo )

I said in my vhost, it should Filter the text/html mime, but nothing happens...
Its kind of miracle for me at the moment, I tried quite a lot, and I cannot find anything on the internet, just the providing website of the mod and even in this board there is no result for a search "mod_trim".

However, could somebody help me, or suggest me another mod, tool for removing the whitespace automatically with apache? Does somebody have similar experience with his vbulletin board and mod_trim ? Or is it just for small html files ?

Need help please,
looking forward receiving some answers.

Reply With Quote
Sponsored Links


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 09:42.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.