Mod_rewrite issues

I have been trying to get Omeka installed on a DigitalOcean Ubuntu 18.04 LTS image, and keep running into the same error message when going to the install page:

Installation Error

mod_rewrite is not enabled.

This is with the 2.6.1 current version of Omeka. I’m following the step by step instructions here:

https://websiteforstudents.com/install-omeka-classic-cms-on-ubuntu-16-04-17-10-18-04-with-apache2-mariadb-and-php-7-2/

Everything seems to be set up correctly - .htaccess is present, I have file permissions set correctly, and I tried both commenting and uncommenting the ReWriteBase line. I tried the trick of going directly to the install.php file and the script runs, but then I get “file not found” errors when going to the admin panel (it does generate the public front page, however).

As far as software versions go - Apache is 2.4.9, PHP is 7.2.

Back in April, I had a functioning installation of what was then the current version of Omeka on Digital Ocean after following the directions here: https://programminghistorian.org/en/lessons/installing-omeka , but I re-thought was I was doing with the site and deleted that installation. After having the issues on 18.04 outlined above, I also tried to follow that install outline with 16.04 and the now current 2.6.1. version of Omeka, but I’m getting the same mod_rewrite issue. I may go back and try an older version of Omeka next to see if that makes the difference, but I’d prefer to be up to date. Any advice would be greatly appreciated. Thanks!

How about the AllowOverride setting for your document root in the Apache configuration file? AllowOverride All is necessary to make Apache actually read the .htaccess file.

It’s in there, assuming that the instructions in the first link are giving me a valid Apache conf file for the site…

For further info, this is what I have in my conf file:

<VirtualHost *:80>
     ServerAdmin admin@example.com
     DocumentRoot /var/www/html/omeka
     ServerName catawissavalleyhistory.org

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

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

It’s saved as omeka.conf in /etc/apache2/sites-available/ and following its creation I ran:

sudo a2ensite omeka.conf
sudo a2enmod rewrite
sudo a2enmod headers
sudo systemctl restart apache2.service

all of which went without error and seems to have loaded everything appropriately. Omeka is indeed located in /var/www/html/omeka on my server.

And you’re actually accessing the site through catawissavalleyhistory.org in your browser? Or are you using the IP directly or something else? Those settings in that VirtualHost section will only apply if the URL is actually catawissavalleyhistory.org.

It actually looks like it’s installed there now… but perhaps someone else actually filled in the install form? The title is a little odd.

:man_facepalming: - I have www.catawissavalleyhistory.org as a CNAME alias for catawissavalleyhistory.org in my host’s domain settings and was unconsciously typing the www…if you hadn’t put me on the right track and that spammer hadn’t proven that it worked to me I probably never would have figured it out :sweat_smile: Thanks!