After loading the rewrite module to Apache, the server returns a 500 error, and the A2enmod command

Source: Internet
Author: User

My machine is Ubuntu.

Today I want to make a rewrite URL to make the URL look a little more beautiful. The alloverride has been specified as all in the Apache configuration file (my/etc/apache/apache2.conf) file . and the following rewrite rules are written in the. htaccess file:

^index http://www.baidu.com

After restarting Apache, the server returned 500 errors, which made me puzzled.

Later, I found a command here in http://www.blogguy.cn/show-751-1.html:

A2enmod rewrite

Then reboot Apache to be OK.

Later, a simple check a2enmod data, this is apache2-common to facilitate the loading of Apache module command, the relative should also have a a2dienmod command, is in pairs appear.

Usage is a2enmod [module] or A2dismod [module]

After loading the rewrite module to Apache, the server returns a 500 error, and the A2enmod command

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.