因为我之前在apache上配置域名跳转时,因为我系统安装的apache里没有mod_rewrite模块,当打算为apache单独编译mod_rewrite模块时又提示了apxs:Error: Command failed with rc=65536,然后了解到可能与libtool文件有关,与此同时发现在目录/usr/local/apache2/build下并没有libtool文件,而且我从别的机器上拷贝过来一个同名文件后仍然不行,我猜测这个libtool和一些别的文件存在着一些依赖关系(还了解的不深。。。),很久没有解决这个问题决定重新编译apache

  在重新编译之前我没有删除之前apache相关目录中的任何东西

  使用的是以下最简练的命令

  ./configure --prefix=/usr/local/apache2

  make

  make install

  然后发现在进行make install这步时出现了错误,提示make: *** [install-recursive] 错误 1以及can not find /usr/local/src/httpd-2.2.16/support,我ls了一下发现此目录中存在着support文件,是因为我之前make时产生了一些以.o为后缀的文件,可以使用make clean将其清除(make clean:可以清除上次make时产生的object文件),再重新make && make install 就可以了

  查看一下现在apache存在的静态编译的模块:

  [root@yue httpd-2.2.16]# /usr/local/apache2/bin/httpd -l
Compiled in modules:
  core.c
  mod_authn_file.c
  mod_authn_default.c
  mod_authz_host.c
  mod_authz_groupfile.c
  mod_authz_user.c
  mod_authz_default.c
  mod_auth_basic.c
  mod_include.c
  mod_filter.c
  mod_log_config.c
  mod_env.c
  mod_setenvif.c
  mod_version.c
  prefork.c
  http_core.c
  mod_mime.c
  mod_status.c
  mod_autoindex.c
  mod_asis.c
  mod_cgi.c
  mod_negotiation.c
  mod_dir.c
  mod_actions.c
  mod_userdir.c
  mod_alias.c
  mod_so.c

初学者鼓捣这个问题鼓捣了好久啊。。。天知道当时有多激动~~o(>_<)o ~~