Enable Apache Rewrite Module on Linux

I use Linux Mint 10 “Julia”. After I installed apache, rewrite module was disabled by default. We need to do some configuration to enable it. It’s easy đŸ™‚

Here I describe the steps to enable rewrite module (mod_rewrite)

Move to apache folder. Type :

cd /etc/apache2

Enable mod_rewrite. Type :

sudo cp mods-available/rewrite.load mods-enabled/

Then edit overriding configuration on /etc/apache2/sites-available/000-default.

We can edit it with editor like nano or gedit, suit your self . If you choose nano editor, you could do it by type :

sudo nano /etc/apache2/sites-available/000-default

Find the following :

Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all

and change it to :

Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all

Finally, restart  your Apache by type

sudo /etc/init.d/apache2 restart

Done!

Leave your comment please đŸ™‚

Advertisements

3 thoughts on “Enable Apache Rewrite Module on Linux

  1. Peredur ab Efrog

    Thanks for that. Got me sorted. Just a couple of things, though…

    I’m using Linux Mint 10, but didn’t have 000-default in sites-available, just default—which I altered instead. So a word about this possibility might be a good idea. Secondly, it might be worth warning readers that nano is an editor. It’s not one I’d heard of, so I was a bit thrown for a minute: then I just substituted gedit. I know. Wimp!

    And finally, you’ve mis-spelt ‘etc’ in ‘/ect/init.d/apache2 restart’

    Thanks again

    PAE

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s