Linux above how to install rewrite module for Apache

Source: Internet
Author: User
How does Linux install the rewrite module for Apache?
The answer on the Internet is: Build a mod_rewrite.so file inside the Apache installation package successful experiment

Problem:

This server I don't know where the Apache installation package is found (Linux novice)

Can you just pass me the local mod_rewrite.so?

------Solution--------------------
To see what version of Apache you have, go to the next source package and compile, your local should not be. Of course, you can try it out yourself,
Or just the next new version of the entire recompile, compile the time Add rewrite module enable-rewrite. What are you using for Linux? Rh?

Add Mod_rewrite Module
 
# Find. -name mod_rewrite.c//Search for mod_rewrite.c files in the Apache source installation directory
 
# CD PATH/TO/MOD_REWRITE.C//Enter the directory containing the mod_rewrite.c file
 
#/usr/local/apache/bin/apxs-c mod_rewrite.c//apxs should specify an absolute path in the bin directory where you are currently using Apache
 
#/usr/local/apache/bin/apxs-i-a-n mod_rewrite mod_rewrite.la
 
If there are no errors, you should compile a mod_rewrite.so file in your Apache modules directory.
 
Edit the httpd.conf file to confirm that the httpd.conf already contains the mod_rewrite.so load statement, as follows:
 
LoadModule Rewrite_module modules/mod_rewrite.so
 
At this point, your Apache should have supported the rewrite.
 
Vicos Note: After completing, remember to restart the server Apache.
  • 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: info-contact@alibabacloud.com 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.