<i id='rlzne'><div id='rlzne'><ins id='rlzne'></ins></div></i>

        <code id='rlzne'><strong id='rlzne'></strong></code>
        1. <fieldset id='rlzne'></fieldset>

          <acronym id='rlzne'><em id='rlzne'></em><td id='rlzne'><div id='rlzne'></div></td></acronym><address id='rlzne'><big id='rlzne'><big id='rlzne'></big><legend id='rlzne'></legend></big></address>
        2. <span id='rlzne'></span>

        3. <tr id='rlzne'><strong id='rlzne'></strong><small id='rlzne'></small><button id='rlzne'></button><li id='rlzne'><noscript id='rlzne'><big id='rlzne'></big><dt id='rlzne'></dt></noscript></li></tr><ol id='rlzne'><table id='rlzne'><blockquote id='rlzne'><tbody id='rlzne'></tbody></blockquote></table></ol><u id='rlzne'></u><kbd id='rlzne'><kbd id='rlzne'></kbd></kbd>
          1. <i id='rlzne'></i>
            <dl id='rlzne'></dl>

          2. <ins id='rlzne'></ins>

            Linux下增加Apache的rewrite Module

            • 时间:
            • 浏览:3
            • 来源:124软件资讯网

              1. Apache安装rewrite模块的时间需要DBM支持  ,否则无法编译  ,以是首先要安装一个GDBM 下载地址:ftp://ftp.gnu.org/gnu/gdbm/
              安装步骤: 进入安装目录,./configure; make; make install; make install-compat; 否则无法编译出ndbm.h头文件.
              2. 然后用Apache bin目录下的apxs下令安装
              /var/apache/bin/apxs -c mod_rewrite.c {
              gcc -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -fpic -DSHARED_MODULE -I/var/apache/include -c mod_rewrite.c
              gcc -shared -o mod_rewrite.so mod_rewrite.o -lgdbm
              /var/apache/bin/apxs -i -a -n mod_rewrite mod_rewrite.so

              然后在http.conf设置文件里加上:LoadModule rewrite_module libexec/mod_rewrite.so
              stop制止apache  ,然后用再start  ,万万注重  ,在这里不能用restart或者graceful参数来重新启动apache  ,必须先制止  ,然后再最先  ,或者是reboot机械  ,否则rewrite将不起作用  。

              I tried to include in my Apache Web server's configuration the mod_rewrite module, but when I restarted the server, I received an error:

              Cannot load /usr/local/apache/libexec/mod_rewrite.so into server:
              /usr/local/apache/libexec/mod_rewrite.so: undefined symbol: dbm_fetch
              The problem, as it turns out, is that mod_rewrite.so is compiled incorrectly. It should be linked with a dbm library but it isn't.

              If you have an up-to-date set of Apache source files, you can easily solve this problem by manually rerunning the last compilation step of this module, using the correct options. When you execute make mod_rewrite.so in the appropriate directory, it performs this final step:

              gcc -shared -o mod_rewrite.so mod_rewrite.lo
              Rerun gcc, this time adding a reference to the GNU gdbm library:

              gcc -shared -o mod_rewrite.so mod_rewrite.lo -lgdbm
              Next, copy the newly created mod_rewrite.so over to /usr/local/apache/libexec or wherever your Apache module files are located.

              In my case, this was all that was needed to solve the problem. Your mileage may vary.