Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
check whether mod_rewrite module is enabled. – Sathya Apr 24 '13 at 3:16
Ok I'll see, mind explaining how to check if its enabled? – ShadowZzz Apr 24 '13 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 – Sathya Apr 24 '13 at 3:48
Ok cool, that fixed the problem. Thank you so much! +1 – ShadowZzz Apr 24 '13 at 4:06
welcome, I've moved the comment to an answer – Sathya Apr 24 '13 at 4:27
up vote 1 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.