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

  • 1 month 23 hours ago
    1.27.2 update
  • 1 month 1 week ago
    Drupal 10/11 config
  • 1 month 1 week ago
  • PHP
    1 month 1 week ago
    PHP 8.3.11 and AlmaLinux
  • 1 month 2 weeks ago
    New version of Pound