While working on Apache Module in Ubuntu,I found rewrite problem in Apache Web Server.I tried to enable the rewrite module but got this error ERROR: Module rewrite does not exist!.After troubleshooting,I found the problem was with mod_rewrite module.

After doing some more troubleshooting,it is found that the rewrite.load file was missing in /etc/apache2/mods-available/ .

Now,I checked the mod_rewrite.so actual module file and Wow it was there.

Below given is step by step command which I ran,to solve this issue.Here is the reference from my system

root@tuxworld:~# a2enmod rewrite
ERROR: Module rewrite does not exist!
root@tuxworld:~# ls -l /usr/lib/apache2/modules/mod_rewrite.so
-rw-r--r-- 1 root root 58728 Jul 12  2013 /usr/lib/apache2/modules/mod_rewrite.so
root@tuxworld:~# 
root@tuxworld:~# echo "LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so" > /etc/apache2/mods-available/rewrite.load
root@tuxworld:~# 
root@tuxworld:~# a2enmod rewriteEnabling module rewrite.
To activate the new configuration, you need to run:
  service apache2 restart
root@tuxworld:~# 

After this I restarted the apache2 service

sudo service apache2 restart

Problem is solved now.

Read Some More Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.