ubuntu12.04 start apache2 support for. htaccess

Source: Internet
Author: User

1. Create in the/etc/apache2/mods-enabled directory

Ln-s. /mods-available/rewrite.load Rewrite.load
Rewrite.load. /mods-available/rewrite.load

Contents of the Rewrite.load file
LoadModule rewrite_module/usr/lib/apache2/modules/mod_rewrite.so

    1. Terminal operation

sudo a2enmod
The program prompts the module name that is available for activation, enter:
Rewrite

Success will prompt rewrite already load

    1. Modify/etc/apache2/sites-enabled/000-default (this link points to a site profile)
      Change the AllowOverride property (the default WWW directory, or the directory where you want to apply the. htaccess) to all, save.

For example:

[HTML] View plaincopy
DocumentRoot "/var/www"

Options followsymlinks  allowoverride All


Options Indexes followsymlinks execcgi includes  allowoverride all  Order allow,deny  

    1. Apache2 the relationship of several configuration files:
      apache2.conf internal calls httpd.conf, conf.d/, sites-enabled/

Flexible to handle when configured

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.