1, about compiling Apache
In fact, when installing Apache, it is best to compile the commonly used modules, so as to save later to add
Common Compile items:
./configure--prefix=<path>--enable-mods-shared=all--enable-so--enable-rewrite
The following do not necessarily have to be specified, but some libraries are dependent packages and must be installed
--with-apr=<path>--with-apr-util=<paht>--with-pcre=<path>
2. Add Apache module
Sometimes in order to install to be able to complete a one-time, not error, only in the installation of the first not to compile some packages, and then later on as necessary to add, that is the following method!
The first modules to be added are: Rewrite module
In the httpd source directory, switch to: Modules/mappers directory
Then execute the following command as follows:
/usr/local/apache2/bin/apxs-c mod_rewrite.c
/usr/local/apache2/bin/apxs-i-a-n mod_rewrite mod_rewrite.la
If you do not have errors, you will be prompted:
Libraries has been installed in:
/usr/local/apache2/modules
Then add the httpd.conf file:
LoadModule Rewrite_module modules/mod_rewrite.so
Linux under extended Apache module