kloxo面板的Lighttpd服务器如何开启Gzip压缩

先进入kloxo管理后台,修改php配置,将Output Compression前面的框打上勾

然后ssh连接到VPS

打开lighttpd.conf

vi /etc/lighttpd/lighttpd.conf

查找

#### compress module

#compress.cache-dir = “/tmp/lighttpd/cache/compress/”

#compress.filetype = (“text/plain”, “text/html”)

把前面的注释符号去掉. 需要压缩的文件类型添加在compress.filetype 里

#### compress module

compress.allowed-encodings = (“bzip2”, “gzip”, “deflate”)

compress.cache-dir = “/tmp/lighttpd/cache/compress/”

compress.filetype = (“text/plain”, “text/html”, “text/javascript”, “text/css”)

重启lighttpd服务:

/etc/init.d/lighttpd restart

原文链接:https://xiaohost.com/61.html,转载请注明出处。
0

评论0

请先