mod_expires 用于发送header,设置静态文件的过期时间而mod_deflate 用于开启gzip压缩,mod_expires 用于发送header,设置静态文件的过期时间。
- cd httpd-2.2.19/modules/metadata
- sudo /usr/local/apache2/bin/apxs -i -a -c mod_expires.c
- sudo vi /usr/local/apache2/conf/httpd.conf
- ExpiresActive On
- FileEtag none
mod_deflate 用于开启gzip压缩
- cd httpd-2.2.19/modules/filters
- sudo /usr/local/apache2/bin/apxs -i -a -c mod_deflate.c
- sudo vi /usr/local/apache2/conf/httpd.conf
- SetOutputFilter DEFLATE
|