compiling Apache 's rewrite module separately
When we compile and install Apache, it's like this:
./configure \
--prefix=/usr/local/apache \//installation path
--WITH-INCLUDED-APR \//cross-platform
--ENABLE-SO \//Enable DSO
--enable-deflate=shared \//dynamically shared way to compile deflate module
--enable-expires=shared \//static
--enable-rewrite=shared \
--with-pcre//Regular related library
But we suddenly found that we did not install the rewrite module , but we needed it very much, so we needed to compile the module separately. The process is as follows:
#cd/usr/local/src/httpd-2.2.32
#cd Modoles
#cd mappers/
#ls
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M00/8F/AB/wKioL1jopvmS8xixAABtIz0kV30698.png-wh_500x0-wm_ 3-wmp_4-s_3816198344.png "title=" 1.png "alt=" Wkiol1jopvms8xixaabtiz0kv30698.png-wh_50 "/>
#/usr/local/apache/bin/apxs-i-a-c./mod_rewrite.c
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/8F/AC/wKiom1jopxfQkq46AADaSGcRNJI096.png-wh_500x0-wm_ 3-wmp_4-s_3704227875.png "title=" 2.png "alt=" Wkiom1jopxfqkq46aadasgcrnji096.png-wh_50 "/>
The output can see that the rewrite module has been activated in httpd.conf.
View Confirmation
# vi/usr/local/apache2/conf/httpd.conf
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M01/8F/AB/wKioL1jopyqgyZP2AAAZQZsvtO0797.png-wh_500x0-wm_ 3-wmp_4-s_3513382689.png "title=" Qq20170408170029.png "alt=" Wkiol1jopyqgyzp2aaazqzsvto0797.png-wh_50 "/>
Then restarting Apache will take effect.
This article from "Leg Hair sadness" blog, reproduced please contact the author!
Compiling Apache's rewrite module separately