Add module to Apache

我现在使用的是 Apache 2.0.49 , 安装在 /opt/apache/ 下。

# /opt/apache/httpd -v
Server version: Apache/2.0.49
Server built: May 24 2004 23:38:26

从前编译安装的时候没有包含 mod_rewrite 模块,如何在不破坏目前正在运行的 Apache 的情况下追加此模块?

# tar zxvf httpd-2.0.49.tar.gz
# cd httpd-2.0.49/modules/mappers
# /opt/apache/bin/apxs -c mod_rewrite.c
# /opt/apache/bin/apxs -i -a -n rewrite mod_rewrite.la

这将会在 /opt/apache/modules/ 下新增一个 mod_rewrite.so 文件,并且主配置档 httpd.conf 中也加入了相应的 LoadModule 条目:

LoadModule rewrite_module     modules/mod_rewrite.so
This entry was posted in Uncategorized and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">