作者:mobiledu2502902687 | 来源:互联网 | 2021-09-06 11:47
编译安装好apache httpd以后,可以继续添加扩展
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