CentOS 6.9 with Apache 2.2.15 and Drupal 8.x


Please forgive the length. I’m trying to provide as many details as I can so that I can best solve this issue.

I have a Drupal 8 test server that is/was running CentOS 6.9, with PHP 5.6.30, MariaDB 10.1.24 and Apache 2.2.15. Except for PHP, all updates are strictly CentOS vanilla, I believe. Recently I decided to reinstall CentOS 6.9 on a newer, larger hard drive so that I might check out some of the performance benefits of PHP 7.x—in this case PHP 7.1 from Remi Collette.

On the older test server, which, I believe, was initially installed with CentOS 6.8 and then upgraded, via yum, to CentOS 6.9, I was able to install Drupal 8.x with no problems at all.

On the new server, however, when I tried installing Drupal 8.3.x on the new installation of CentOS 6.9, PHP 7.1.8, Apache 2.2.15 and MariaDB 10.1.26, I was now seeing warnings regarding the Apache version (Apache/2.2.15 The minimum version of Apache needed to run Drupal without mod_rewrite enabled is 2.2.16. See the enabling clean URLs page for more information on mod_rewrite.) on the install page. I was able to add “&rewrite=ok” to the URL and bypass this, although I was not planning to run Apache without mod_rewrite enabled, so I didn’t see how this warning really applied to me. Regardless, the “&rewrite=ok” workaround enabled my to bypass the ‘Drupal Requirements Problem’ page and successfully complete the install. However, once complete, I was greeted with a simple HTML page devoid of theming or CSS. When I clicked on any of the links under the ‘Administration Menu’, I’m greeted with a ‘Not Found’ page stating, ‘The requested URL /test/admin/content was not found on this server.’ and so on for every other link.

I have used my best Google Fu and everything points me to problems with regards to mod_rewrite being enabled. On my phpinfo page, mod_rewrite is listed under ‘Configuration – apache2handler’.

Running httpd -M | grep rewrite yields
rewrite_module (shared)

In my /etc/httpd/conf/httpd.conf file, line 190 lists, ‘LoadModule rewrite_module modules/mod_rewrite.so

ls -l in /usr/lib64/httpd/modules yields ‘-rwxr-xr-x 1 root root 64560 Aug 15 21:46 mod_rewrite.so‘ so the module itself exists.

So, it’s my guesstimation that mod_rewrite is NOT the problem here as nothing seems to allow me to access anything beyond the main Drupal page. As this is my server—I have root—I don’t believe .htaccess is an issue. Additionally, from what I’ve read, .htaccess should only be used if one does NOT have root access to the full httpd.conf file. Also too, in my experiences installing Drupal 7/8, I have never even touched .htaccess, so I would be surprised if there was anything in there that would solve my problem.

I’ve also read of issues with regards to changing directory options in httpd.conf from ‘AllowOverride None’ to ‘AllowOverride All’. From my understanding, this is necessary in order for Drupal to be able to process the .htaccess file within the Drupal directory. Again, as I have root access to httpd.conf, this shouldn’t apply; however, I tried not to overlook any possible solution.

Steps I’ve taken to try to resolve this
Adding to my confusion, I took the original hard drive and reinstalled it into the test server. Other than PHP version, it’s virtually the same configuration. About ten days ago, using the ‘older’ server, I did a fresh installation of Drupal 8.3.6 and I received NO warning nor did I see the ‘Drupal Requirements Problem’ page. No issues with Apache 2.2.15 listed at all. Strange, no?

Going back to the newer hard drive, I did a fresh installation of CentOS 6.9 with Apache 2.2.15, MariaDB 10.1.26 and I even went back to PHP 5.6.31 to see if this might be a problem with PHP 7.1.x. Why PHP would be registering Apache version issues during a Drupal install didn’t make any sense, but I was willing to give it a shot. No change. I still received the Apache version warning and, after adding ‘&rewrite=ok’, proceeded to complete the installation. Again, no theme/CSS and zero navigation.

So, I’m at a loss as to how to proceed. Upgrading to the latest Apache 2.2.34 or even 2.4.27 are not viable solutions due to the myriad of dependencies. Forgive my obtuseness but, again, I’m not certain why this is such an issue with regards to Apache versions as I’m not running Apache without mod_rewrite.

My current idea is now focused on trying to find out where and how Drupal scans for Apache version and how I might be able to bypass this. As mod_rewrite doesn’t seem to be the issue, I’m of the opinion that somehow, by virtue of generating this Apache version warning and/or using ‘&rewrite=ok’ is somehow the source of my problem. Where this Apache query originates might also have some relevence due to the initial installation of, I believe, CentOS 6.8 on the older, original hard drive that’s not generating any errors. I have scanned numerous Drupal files, mainly in the core directory, looking for some indication of this Apache lookup but this is like the blind leading the blinder.

Again, my apologies for the length but I’m finding this issue to be quite troubling and I’m more than a bit frustrated with the lack of an obvious or apparent solution. Thanks in advance for your time & efforts.

Drupal version: 

Source: https://www.drupal.org/taxonomy/term/1/feed