Mod_Rewrite error after installing Omeka 2.7 in Ubuntu 18.04 LTS

I get a " mod_rewrite is not enabled." error when I try to view http://localhost/omeka in my web browser after following the instructions I found here:

I basically followed those instructions, but replacing the address in the wget command with the correct directory for the Omeka version 2.7 zip file.

So, I think I’ve supposedly enabled mod_rewrite with the “sudo a2enmod rewrite” command. But, when I run it, I get “Module rewrite already enabled” as the reply.

Also, I’ve uncommented the “SetEnv APPLICATION_ENV development” line in the .htaccess file. I’ve also uncommented the RewriteBase line, but I’m not sure I have the right directory for the Base directory. (What is the base directory, exactly?) I have:
RewriteBase /var/www/html/omeka

Also, I see in the .htaccess file a line that says “RewriteEngine on”. That looks good.

Please offer any suggestions you may have. Especially, would you recommend a different tutorial for installing Omeka 2.7 on Ubuntu? I’m perfectly happy to start over, if that’s what it takes.


1 Like

If you have mod_rewrite installed, the usual reason for getting a “not enabled” message is that you don’t have the AllowOverride setting in your Apache configuration enabled. The instructions you linked to do seem to include that setting, though.

The only other common culprit (also covered in those instructions) is that you’d have to restart Apache after enabling the rewrite module for it to take effect.

“If you have mod_rewrite installed…”

Thanks, jflatlines. O.k., so how do I check whether or not it’s installed?

You do have it installed, and enabled, according to your post.

O.k., well, I have already tried restarting Apache2. I still get the error. When is the mod_rewrite installation error created? I notice that it’s carried in an html file, but I’m not sure what prompts the creation of the html file. When it says “try again”, does it mean that I should try to install Omeka again?

I guess I will try a different tutorial, maybe also will try a different OS. Either Debian Testing or Ubuntu 19.