mod_compress

Compress output from your web server to save on bandwidth and improve throughput.

Add mod_compress to server.modules directive of /service/lighttpd/root/lighttpd.conf:

server.modules += ( "mod_compress" )

Add a compress.cache-dir directive for where compressed files will be stored. This directive can also go in an $HTTP host directive if you want different cache directories per virtual host:

compress.cache-dir = "/tmp/lighttpdcompress/"

Define which mimetypes will be compressed. This example will compress Javascript, plain text, css, and XML files:

compress.filetype = ("text/plain","text/css", "text/xml", "text/javascript" )

Create the directory for the temp files:

mkdir -p /tmp/lighttpdcompress/
chown nobody:nobody /tmp/lighttpdcompress/

Restart lighttpd:

svc -t /service/lighttpd

Compression of Dynamic PHP content
Enable compression in /usr/local/lib/php.ini:

zlib.output_compression = On
zlib.output_handler = On

Restart lighttpd:

svc -t /service/lighttpd

Recent Updates

  • 2 years 2 days ago
  • 2 years 2 days ago
  • 2 years 4 days ago
    php 8.x
  • 2 years 5 days ago
    10.6.7
  • 2 years 1 week ago
    Drop Centos 5/6 stuff