0

I am looking to enable .htaccess in my Ubuntu server, I have ssh access and have attempted:

sudo nano /etc/apache2/sites-available/default and changing AllowOverride from none to all under directory /var/www/ , but that causes my server to give me a 500 Internal Sever Error message...

Any solutions?

5
  • 1
    check whether mod_rewrite module is enabled.
    – Sathyajith Bhat
    Apr 24, 2013 at 3:16
  • Ok I'll see, mind explaining how to check if its enabled?
    – ShadowZzz
    Apr 24, 2013 at 3:38
  • try sudo a2enmod rewrite and follow it up with sudo service apache2 restart. If you're still getting an error, edit your question & add the contents of .htaccess & /etc/apache2/apache2.conf file
    – Sathyajith Bhat
    Apr 24, 2013 at 3:48
  • Ok cool, that fixed the problem. Thank you so much! +1
    – ShadowZzz
    Apr 24, 2013 at 4:06
  • welcome, I've moved the comment to an answer
    – Sathyajith Bhat
    Apr 24, 2013 at 4:27

1 Answer 1

1

As mentioned in comments, merely changing overrides isn't enough to enableURL rewrite - you'll have to enable Rewrite module.

You can do so by typing

sudo a2enmod rewrite

and then restart Apache service

sudo service apache2 restart

That should do the trick.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .