.configure

简介: .configure

安装deflate模块

./configure \ --enable-deflate

make && make install

在主配置文件末尾添加参数

 AddOutputFilterByType DEFLATE text/html text/plain text/css text/xml text/javascript image/jpg

 DeflateCompressionLevel 9

 SetOutputFilter DEFLATE

vim /usr/local/httpd/conf/httpd.conf

把106行的这条

#LoadModule deflate_module modules/mod_deflate.so

#去掉,注释掉

检查语法和模块是否开启

httpd -t

Syntax OK  ###语法正确

apachectl -t -D DUMP_MODULES | grep "deflate"

deflate_module (shared) ###deflate模块开启

vim /usr/local/httpd/htdocs/index.html

编辑主页添加一张图片(不要忘记给图片授权)

It works!

网络异常,图片无法展示
|

启动验证一下

systemctl start httpd

关闭apache

systemctl stop httpd

安装expires模块

./configure \ --enable-expires

make && make install

在主配置文件末尾添加参数

 ExpiresActive On

 ExpiresDefault "access plus 30 seconds"

vim /usr/local/httpd/conf/httpd.conf

把113行的这条

#LoadModule expires_module modules/mod_expires.so

#去掉,注释掉

检查语法和模块是否开启

httpd -t

Syntax OK

apachectl -D DUMP_MODULES | grep expires

expires_module (shared)

相关文章
./configure *: No such file or directory
今天在CentOS下安装Nginx时,遇到了类似以下的问题: ./configure auto/unix: No such file or directory ./configure auto/options: No such file or directory 之前在另一台服务器上安装的时候也没有遇到此问题, 安装过程参考:CentOS6.5下Nginx1.7.4安装记录 于是网上搜索解决方案,但是搜索了很久也没有找到解决方案, 当我使用“mkdir auto/unix”之后,还是提示类似的错误,但目录名又变了。
3417 0
|
9月前
|
ubuntu php libzip安装 ./configure报错 checking for libzip... not found configure
ubuntu php libzip安装 ./configure报错 checking for libzip... not found configure
166 1
make与 configure
【5月更文挑战第10天】make与 configure。
69 1
autoreconf: ‘configure.ac‘ or ‘configure.in‘ is required
autoreconf: ‘configure.ac‘ or ‘configure.in‘ is required
414 0
configure: The C compiler (located as /usr/bin/gcc) does not seem to be the required gcc compiler.
configure: The C compiler (located as /usr/bin/gcc) does not seem to be the required gcc compiler.
179 0
没有安装gcc,导致提示configure cannot guess build type; you must specify one
没有安装gcc,导致提示configure cannot guess build type; you must specify one
201 0
./configure、make、make install 命令详解
这些都是典型的使用GNU的AUTOCONF和AUTOMAKE产生的程序的安装步骤 一、基本信息 1、./configure 是用来检测你的安装平台的目标特征的。
4272 0