forked from brianpane/jitify-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
50 lines (46 loc) · 2.06 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Sorry, there isn't a configure script for jitify-core yet.
There are three targets you can build from jitify-core:
1. Jitify Tools, the command-line application
2. Jitify for Apache, the module for Apache 2.2
3. Jitify for nginx, the module for nginx-1.0
To build Jitify Tools:
1. cd to the root of the jitify-core source distribution
2. make tools
3. The Jitify Tools executable is now at build/jitify
4. cp build/jitify /wherever/you/want/to/put/it
To build Jitify for Apache:
1. cd to the root of the jitify-core source distribution
2. Open the Makefile in your text editor of choice, and
CHANGE the APACHE_HOME declaration at the top to point
to the base directory of your Apache installation. The
Makefile looks for Apache's apxs build tool under
$APACHE_HOME/bin
3. make apache
4. The Jitify for Apache dynamically loadable module is
now at build/mod_jitify.so
5. cp build/mod_jitify.so /wherever-your-apache-installation-is/modules
6. Add these lines to your Apache httpd.conf:
LoadModule jitify_module modules/mod_jitify.so
<IfModule jitify_module>
# Enable the minification transform
Minify On
</IfModule>
7. Restart Apache
To build Jitify for nginx:
1. If you don't already the source code for nginx 1.0.x
download and unpack it.
2. In your nginx-1.0.x source directory, run the configure script:
CFLAGS="-O3 -g" ./configure \
--prefix=/directory/where/you/want/to/install/nginx \
--add-module=/dir/containing/jitify-core/jitify-core-version/src/nginx \
any additional nginx config options you need...
The setting of those CFLAGS arguments is optional. "-O3" enables
a relatively thorough level of optimization in the compiler,
and "-g" adds debugging metadata to make the resulting nginx
program easier to troubleshoot with gdb.
3. Still within the nginx-1.0.x source directory,
make
sudo make install
4. Edit your nginx.conf to add these lines inside the "http { ... }" block:
minify on;
5. Restart nginx.