Drupal site returning 404 error for all pages besides the main page I have two completely independent Drupal installations on the same server. Both have https enabled in the settings file, and the Apache configuration was literally copied from one file to the other. However, one of them works under HTTPS and the other does not. The broken site will open the front page successfully, but, for example, https://www.example.com/user will return a 404. https://www.example.com/index.php?q=user works fine.

I opened the apache config of the WORKING site, and changed the DocumentRoot to the directory of the BROKEN site, and tried the site using the working URL, and I see the broken site...and it IS STILL broken.  This leads me to believe that it is not Apache, but something in the Drupal installation or configuration which is misbehaving. 

Both installations have an .htaccess file in the base directory, and in sites/default/files, and the files are identical. 

The apache error logs for both sites have the same errors:

server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)

and

server certificate does NOT include an ID which matches the server name

Any advice on where to look next?
I copied and pasted the &lt;VirtualHost *:443&gt;
section several times...and every time I changed the ServerName and ServerAlias...but didn't change the &lt;Directory /var/www/example.com&gt;

I hang my head in shame and embarrassment.