Enable Apache2 rewrite module instance in Debian

Source: Internet
Author: User

For a long time, Centos is used as the server. Although Ubuntu is used on the desktop, it is not familiar with the Debian series configuration. I recently learned about Raspberry Pi and recorded it here. Debian's Apache2 configuration file is stored in the/ect/apache2 directory.


Modules available for mod-available
Mod-enabled module
Site configurations available for sites-available
The a2enmod and a2dismod configurations of sites-enabled sites can be used to enable or disable modules. Enable rewrite module:

Sudo a2enmod rewrite

At this time, the module can be loaded, but the site configuration has not enabled rewrite
Modify/etc/apache2/sites-enabled/000-default to include:

AllowOverride None

To:

AllowOverride All

Restart the Apache2 service.

Sudo/etc/init. d/apache2 restart

You can.

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.