Enable the rewrite module for Apache in Ubuntu

Source: Internet
Author: User
Run the following command to install the rewrite module in Ubuntu: sudoa2enmodrewrite: the mod-available (disabled module) and the mod-enabled (enabled module) in the/etc/apache2 directory ). The above command alone is not enough to rewrite the mechanism for Apache to receive requests. You also need to run the command; sudovim/etc/apache2/sites-enabled/000-def

Enable rewrite module in Ubuntu

Run the following command to install:

Sudo a2enmod rewrite

In the/etc/apache2 directory, the options are "mod-available" and "mod-enabled ).

The above command alone is not enough to rewrite the mechanism for Apache to receive requests.

You also need to run the command;

Sudo vim/etc/apache2/sites-enabled/000-default

Set

AllowOverride None

Change all

AllowOverride All

The connection above/etc/apache2/sites-enabled/000-default is actually/etc/apache2/sites-available/default.

AllowwOverride None completely ignores the. htaccess file. Naturally, the rewrite rules defined in AllowwOverride do not take effect.

------------------------------------- I am a split line -------------------------------------

How does Apache Rewrite in Ubuntu enable http://www.linuxidc.com/Linux/2010-10/29027.htm?

Several highlights of http://www.linuxidc.com/Linux/2015-01/111914.htm after Apache 14.04 upgrade to 2.2 in Ubuntu 2.4

Install the LAMP \ Vsftpd \ Webmin \ phpMyAdmin service and settings in Ubuntu 13.04Http://www.linuxidc.com/Linux/2013-06/86250.htm

Compile and install LAMP (Apache 2.2.44 + MySQL 5.6.10 + PHP 5.4.12) http://www.linuxidc.com/Linux/2013-03/80333p3.htm in CentOS 5.9

Source code construction of Web Server Architecture in RedHat 5.4 LAMP environment and application PHPWind http://www.linuxidc.com/Linux/2012-10/72484p2.htm

LAMP source environment to build WEB Server Linux + Apache + MySQL + PHP http://www.linuxidc.com/Linux/2013-05/84882.htm

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

This article permanently updates the link address: Http://www.linuxidc.com/Linux/2015-01/112117.htm

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: 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.