Archive

文章標籤 ‘FreeBSD’

[Lighttpd] 開啟壓縮功能

2008年5月22日 ceciltsai 尚無評論

啟動壓縮功能後,對於單純文字網頁的大小,理論上可以減少 60%~70% 的大小
如此一來對於頻寬小如我家的網路不無小補…

環境:FreeBSD 7.0 Release + Lighttpd 1.4.19

1) 修改 /usr/local/etc/lighttpd.conf,uncomment 『mod_compress』
2) 設定 compress.cache-dir=』the-path-you-want-to-put-cache』
3) 指定 compress.filetype= (『text/plain』,』text/css』, 『text/xml』, 『text/javascript』 )
4) 修改 /usr/local/etc/php.ini,將zlib.out_compression 及 zlib.outpout_handler 皆設為 ON
5) 存檔,restart lighttpd

參考資料:
mod_compress: Lighttpd Gzip Compression To Improve Download and Browsing Speed

Categories: FreeBSD, Software Tags: