1.源代码配置参数:
--prefix=/usr/mytools/httpd2
--enable-so--with-included-apr
--with-mpm=worker
--disable-authn-file
......
--disable-proxy-ajp
--enable-modules='rewrite deflate proxy'--enable-mods-shared='cgid ssl include'
说明:
1.对于公共的模块采用静态编译,即永久包含进内核,如:rewrite proxy;
2.去除不必要的信息;
3.动态共享对象的方式编译部分参数:如ssl include cgid,并非每个模块都用
这种方式的编译动静结合,有利于加快访问,同时提供适当的灵活性。
2.查看编译进内核的模块:
httpd -l
Compiled in modules:
core.c
mod_authz_host.c
....
mod_setenvif.c
mod_proxy.c
mod_proxy_http.c
mod_proxy_balancer.c
worker.c
.....
mod_rewrite.c
mod_so.c
3.问题排除:
3.1.分析模块的是否是包含模个函数:
strings mod_****.so | grep *
3.2.启动报elf64活elf32错误:注意一下编译机器的版本,32还是64
4.并发检查:ab测试,主要用来简单测试当前配置的并发处理能力
./ab -c 10 -n 100 说明:10个并发,总共请求100次