"mod_rewrite is not enabled"

I am getting the error message “mod_rewrite is not enabled” when the server itself is telling me that this is in fact enabled.

I also have added AllowOverride ALL into my Omeka conf file, but I’m still getting the error.

The Apache service and the server have been rebooted multiple times.

Contents of my conf file:

<VirtualHost *:80>
ServerAdmin admin@localhost
DocumentRoot /var/www/html/omeka
ServerName localhost

    <Directory /var/www/html/omeka >
            Options FollowSymlinks
            AllowOverride ALL
            Require all granted
    </Directory>

    ErrorLog /var/log/apache2/omeka-error_log
    CustomLog /var/log/apache2/omeka-access_log common

I’ve tried using “localhost” and the hostname of the server but neither works.

Also, just fixed the few typos I just noticed in there. “FollowSymLinks” and “Override All” and it’s still not working.

Here’s one easy thing to try: edit your Omeka .htaccess file and just put some gibberish at the beginning, then try to go to the site.

If everything’s set up and the file’s being read by Apache, you should get an Internal Server Error white-screen error message from Apache. If instead the site still loads (i.e., you still see the mod_rewrite not enabled error message), then you have an issue with your Apache configuration.

It still returns the mod rewrite error when I add the gibberish. I figured it was something with the configuration file but I have no idea what. I must have tried a dozen or more variations of minor details in the conf file but nothing works.

I’ve tried changing the server name from localhost to the actual hostname. No go.

I’ve tried substituting the server name and localhost for the * in the first line. No go.

I’ve tried “administrator@localhost” and “administrator@actualservername” instead of admin. No go.

So yeah, if adding just junk to the top of the .htaccess file doesn’t change anything (I’m thinking like, the text test123 on its own line at the top, though what it is shouldn’t matter as long as it’s not commented out), then you’re in a situation where Apache is not reading your .htaccess file.

What you initially posted from your Apache config looked OK, with the change to spelling you mentioned, anyway. Are you restarting/reloading Apache after making these changes? It doesn’t reread its configuration file unless you do that.

Finally just scrapped the installation and I’m going to try it again from scratch.

Update to an old post, but I finally managed to resolve this issue. Basically most of the documentation and various guides scattered around the internet tell you to create a custom Omeka conf file and enter all that Virtual Host data into that. This doesn’t work. Instead I started using the default conf file that apache creates when you install it. It has a name such as “default003” or something along those lines. This exact same information entered in that conf file instead of the custom Omeka file worked fine.

Second thing to watch out for: I managed to fix this last week but still thought it was broken because my browser kept pulling the old broken version of the site from cache. I happened to log back in to check it again today and it was miraculously working because it didn’t pull from cache anymore.

So if you have tried everything and are 98% sure what you’ve done is correct but you are still getting this error, try emptying out your browser’s cache.

1 Like

Hi @lragsdale,
I have the same problem, the mod_rewrite tells me that it is not enabled when it really is.
But for some reason, OMEKA does not identify it, and for example it marks me an error in the themes, cannot find it.
What was your exact solution? did you pass all the .htacces to the apache config file?
Thanks!