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

  • PHP
    1 year 4 months ago
    PHP 7.4
  • 1 year 5 months ago
    MariaDB 10.4.12
  • 1 year 5 months ago
    Dovecot 2.3.10
  • 1 year 5 months ago
    CentOS 6 revisions
  • 1 year 5 months ago
    Copy of the revision from Wed, 08/22/2018 - 13:39.