Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Drupal 8 not recognizing clean url support #945

Closed
shawnachieve opened this issue Oct 26, 2016 · 6 comments
Closed

Drupal 8 not recognizing clean url support #945

shawnachieve opened this issue Oct 26, 2016 · 6 comments
Labels

Comments

@shawnachieve
Copy link
Contributor

Whenever I setup a new DrupalVM site for Drupal 8 (or try to reinstall an existing D8 site), Drupal always comes up and says that DrupalVM does not support clean URLs.

The actual message that shows up during the requirements check is:

Your server is capable of using clean URLs, but it is not enabled. Using clean URLs gives an improved user experience and is recommended.

This message comes up whether I install through the browser going to http://mysite.local/core/install.php or via drush site-install.

I am able to install the site and everything works correctly if I click the "continue anyway" link on the install.php page, but there doesn't seem to be a way around this from drush.

Since I haven't seen anyone else posting about this issue I'm assuming it's something specific to my setup.

Any thoughts on what may be causing this and how to fix it?

Here is some info on my setup:

  • DrupalVM 3.4.0 (checked out tag from github) running on Mac OS 10.12
    • I had this same problem with DrupalVM 3.2.x and Mac OS 10.11 as well.
  • Drupal 8.1.10
  • Pretty much a stock config.yml file.
    • The main differences are using the auto-network plugin with an IP setting of 0.0.0.0
    • Setting up the vagrant_synced_folders to use rsync.
    • Turned off the automatic make file and site install commands.

Thanks.

@geerlingguy
Copy link
Owner

@shawnachieve - I've noticed the same thing. Not entirely sure why Drupal fails that initial check—my guess is a bug in Drupal core :)

It would be nice to figure out what's happening, but as it doesn't really cause any functional issues, I haven't ever had it as a priority.

@shawnachieve
Copy link
Contributor Author

I'm still working through what's going on, but so far what I can tell is that the following rewrite command in the .htaccess file is not triggering:

RewriteRule ^core/install.php core/install.php?rewrite=ok [QSA,L]

The above command is suppose to append a "rewrite" query parameter to the core/install.php URL. If the install script doesn't see that rewrite parameter it assumes that mod_rewrite is disabled.

So far what I've seen with mod_rewrite debugging enabled is that this rewrite rule runs against everything but "core/install.php" (e.g. CSS files, theme files, etc.)

Still trying to figure out the underlying cause though.

@geerlingguy
Copy link
Owner

Weird... I wonder if somehow the ProxyPass setup is not proxying that particular rewrite correctly or something? Maybe it's an Apache bug?

@thom8
Copy link
Collaborator

thom8 commented Nov 7, 2016

Looks like ProxyPassMatch is triggered before this rewrite rule as core/install.php matches the regex.

Modifying this line https://github.com/geerlingguy/drupal-vm/blob/master/default.config.yml#L109

to RewriteRule ^/(.*\.php(/.*)?)$ "fcgi://127.0.0.1:9000{{ drupal_core_path }}$1" [P]

Will allow this rewrite rule to work however Apache has a performance warning in their docs for this configuration - https://httpd.apache.org/docs/2.4/rewrite/flags.html#flag_p

Using this flag triggers the use of mod_proxy, without handling of persistent connections. 

This means the performance of your proxy will be better if you set it up with ProxyPass or ProxyPassMatch

@geerlingguy
Copy link
Owner

For now, I'm going to close this as a won't fix for two reasons:

  1. This may be a moot point once I roll off support for the soon-to-be unsupported Ubuntu 12.04 and CentOS 6 (which include Apache 2.2 and are the reason we're using the exact proxy syntax we're using).
  2. Since most installs are via Drush, and that warning isn't displayed, this isn't too common an issue, and even then, you can click through the UI installer to the next step and there's no functional difference.

Thanks!

@oxyc
Copy link
Collaborator

oxyc commented Dec 29, 2016

Fixed in #1086.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants