Lamp--apache Expansion Module Installation

Source: Internet
Author: User

When configuring the domain name 301 Jump, we find that the MOD_REWRITE.C module is not loaded, so take this as an example.

This is using the Apache extension tool APXS

Before using this feature, verify that the Mod_so module has been loaded by:

[Email protected] ~]#/usr/local/apache2/bin/httpd-l

There is a MOD_SO module in the list listed, which indicates that it is already loaded.

Then find the module's C file under the source package.

[[email protected] ~]# cd /usr/local/src/httpd-2.2.31[[email protected]  httpd-2.2.31]# find . -name mod_rewrite.c./modules/mappers/mod_rewrite.c[[email  protected] httpd-2.2.31]# cd ./modules/mappers/[[email protected] mappers]# pwd/ usr/local/src/httpd-2.2.31/modules/mappers[[email protected] mappers]# /usr/local/apache2/bin/ Apxs -i -a -c mod_rewrite.c/usr/local/apache2/build/libtool --silent --mode= compile gcc -prefer-pic   -dlinux -d_reentrant -d_gnu_source -g - O2 -pthread -i/usr/local/apache2/include  -i/usr/local/apache2/include   -i /usr/local/apache2/include   -c -o mod_rewrite.lo mod_rewrite.c &&  touch mod_rewrite.slo/usr/local/apache2/build/libtool --silent --mode=link gcc  -o &Nbsp;-rpath /usr/local/apache2/modules -module -avoid-version    mod_ Rewrite.lo/usr/local/apache2/build/ sh_libtool= '/usr/local/apache2/build/libtool '  mod_ /usr/local/apache2/modules/usr/local/apache2/build/libtool --mode=install cp /usr/local/apache2/modules/cp .libs/ /usr/local/apache2/modules/ Mod_rewrite.socp .libs/mod_rewrite.lai /usr/local/apache2/modules/mod_rewrite.lacp .libs/mod_ Rewrite.a /usr/local/apache2/modules/mod_rewrite.achmod 644 /usr/local/apache2/modules/mod_ Rewrite.aranlib /usr/local/apache2/modules/mod_rewrite.apath= "$PATH:/sbin"  ldconfig -n / Usr/local/apache2/modules----------------------------------------------------------------------libraries  have been installed in:   /usr/local/apache2/modulesif you ever  happen to want to&Nbsp;link against installed librariesin a given directory, libdir, you  must either use libtool, andspecify the full pathname of  the library, or use the  '-llibdir ' Flag during linking and do  at least one of the following:   - add libdir to  the  ' Ld_library_path '  environment variable     during  execution   - add libdir to the  ' Ld_run_path '  environment  variable     during linking   - use the  '-Wl,-- Rpath -wl,libdir '  linker flag   - have your system  administrator add libdir to  '/etc/ ' see any operating system  documentation about shared LIBRARIES FORMORE INFORMATION, SUCH AS THE LD (1)  and (8)  manual pages.----------------------------------------------------------------------chmod 755  /usr/local/apache2/modules/[activating module  ' rewrite '  in /usr/local/ APACHE2/CONF/HTTPD.CONF]


Libraries has been installed in:


Know where the module is installed.

This article is from the "Learn Notes for students" blog, please make sure to keep this source

Lamp--apache Expansion Module Installation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.