Jitify for Apache Documentation
Overview
Jitify for Apache, also known as mod_jitify,
is a plug-in module for the Apache
2.2 web server. It performs transformations on
outbound content. It works with both static content (flat files in the
Apache docroot) and dynamic content (PHP, mod_proxy, etc).
Jitify for Apache currently supports HTML, JavaScript, and CSS2 content. On requests for other content-types, it leaves the HTTP response body unmodified.
- If you don't already have an installation of Apache 2.2.x, download
and install it. Make sure to enable
mod_sofor dynamic shared object support. - Download the
jitify-coresource distribution - Unpack the tar file:
bunzip2 < jitify-core-version.tar.bz2 | tar xf - cd jitify-core-version - Edit the
Makefile: set the$APACHE_HOMEvariable at the top to point to the base of your Apache installation. - Compile:
make apache - When the compilation completes, the file
mod_jitify.sowill be in thebuildsubdirectory. Copy it into themodulessubdirectory under your Apache installation. - Add these lines to your
httpd.conf:LoadModule jitify_module modules/mod_jitify.so <IfModule jitify_module> # Enable the minification transform Minify On </IfModule> - Stop and restart Apache.
Directives for use in httpd.conf:
Minify On|OffTurn minification on or off.
This directive may be used at the top level in
httpd.confand within<Location>and<Directory>blocks
mod_jitify uses the standard Apache logging mechanism to
write diagnostic information to the httpd error log file (normally
logs/error_log). The amount of information logged depends
on the LogLevel setting:
warnor higher: details of any syntax errors encountered while parsing contentinfoor higher: measurements of processing speed and before-and-after content size for each requestdebugor higher: quite a bit of information about what themod_jitifyinternals are doing