404s on all sub-pages after install

We have an instance of Omeka Classic (v 2.6.1) running on an Apache/2.4.18 (Ubuntu) server, accessible on a subdomain (site1.domain.org). Files are stored in /var/www/site1. It works fine, and the install process went smoothly.

Now we’re trying to install another instance of Omeka Classic in another subdomain (in the folder /var/www/site2), and are getting tons of errors, seemingly related to mod_rewrite. When we went to run the install script, it would only work if we went directly to /install/install.php. After that process completed (without errors), the homepage shows as it should, but you get a 404 if you try clicking on any of the links or going to /admin (though adding “/admin” to the home url does redirect you to /admin/users/login).

So what’s going on here? Both installs have identical .htaccess files. Un-commenting the “RewriteBase” line of the .htaccess file of the site that is not working has no effect. Permissions and ownership of the directories look the same for both sites. And again, the site that’s not working is just a fresh Omeka install–nothing ported over from a pre-existing site.

Any ideas for what to try next would be appreciated.

Yeah, if you had to manually go to install/install.php and only the “front” page of the site works, that’s a classic case of mod_rewrite not working.

By manually going to install/install.php you’re bypassing the mod_rewrite check. Your problem probably lies in Apache settings: make sure mod_rewrite is enabled, that AllowOverride is enabled for the directory the site is in, and though you already covered these, that the .htaccess file is present and readable by the server.

Sure enough, this problem was caused by a syntax error in one of our Apache config files. It just took us a while to find it.