Install and enable apache mod_rewrite on Ubuntu

By Detector | 19 May 2011



If you need to install apache server first, check this detector-pro tutorial. Default LAMP installation does not include apache mod_rewrite enabled so you need to add it manually.

Here is easy way to do that. Open your terminal and enter:

sudo a2enmod rewrite

This will enable rewrite module for apache. Now you must edit apache configuration file.

sudo gedit /etc/apache2/sites-enabled/000-default

Next, on first and second section add “All” without quotes as the example below:
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

Save the file and restart apache:

sudo /etc/init.d/apache2 restart

Thats’ it. Now apache mod_rewrite is enabled.

Tags | , , , ,

| |

One Response to “Install and enable apache mod_rewrite on Ubuntu”

  1. math tutor says:

    Thanks for your posting. I want to install Apache but facing some problem but after visiting your blog I think it will solved my problem.






Archives

Add to Technorati Favorites
website stats
TwitterCounter for @ukion