mod_rewirte コンパイル&インストール( http.conf側でlibg

mod_rewrieのコンパイル&インストールを以前追加で行ったが
httpd.conf 側で /usr/include/libgdbm.soファイルを "LoadFile" している。
これをmod_rewriteコンパイルするタイミングで指定し、"LoadFile" を指定しなくても実行できるようなバイナリファイルを作成する方法を行う。

"mod_write のコンパイル"

/usr/local/apache/bin/apxs -c -ldb -I/usr/include/gdbm mod_rewrite.c

mod_rewrite がndbm.h ファイルをinclude しているが標準の検索パスから
探索しているので -I/usr/include/gdbm を検索パスに指定

gcc -shared -ldb -L/usr/lib -o mod_rewrite.so mod_rewrite.o /usr/lib/libgdbm.so

"/usr/lib/libndbm.so" を 指定してオブジェクトを作成
*ディストリビュージョンによっては /usr/lib/libndbm.so を指定

/usr/local/apache/bin/apxs -i mod_rewrite.so

下記参考サイトでは "LoadFile" しているところを今回は修正した

参考サイト
http://www.kreis-net.jp/blog/archives/2005_05.php