summaryrefslogtreecommitdiff
path: root/doc/compress.txt
blob: 7b083e940c02328ad7afffc1f13d228f613d93cd (plain)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
==================
Output Compression
==================

--------------------
Module: mod_compress
--------------------

:Author: Jan Kneschke
:Date: $Date: 2004/08/29 09:43:49 $
:Revision: $Revision: 1.1 $

:abstract:
  a nice, short abstrace about the module
  
.. meta::
  :keywords: lighttpd, compress
  
.. contents:: Table of Contents

Description
===========

Output compression reduces the network load and can improve the overall
throughput of the webserver. 

Only static content is supported up to now.

The server negotiates automaticly which compression method is used.
Supported are gzip, deflate, bzip.

Options
=======

compress.cache-dir
  name of the directory where compressed content will be cached

  e.g.: ::
  
    compress.cache-dir = "/var/www/cache/"
    
    # even better with virt-hosting
    $HTTP["host"] == "docs.example.org" {
      compress.cache-dir = "/var/www/cache/docs.example.org/"
    }
    
  Default: not set, compress the file for every request

compress.filetype
  mimetypes where might get compressed
  
  e.g.: ::
  
    compress.filetype           = ("text/plain", "text/html")

  Default: not set


Compressing Dynamic Content
===========================

To compress dynamic content with PHP please enable ::

  zlib.output_compression = 1
  
in the php.ini as PHP provides compression support by itself.