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

Drupal core redirects fail on fresh installation #1055

Closed
ba66e77 opened this issue Dec 16, 2016 · 4 comments
Closed

Drupal core redirects fail on fresh installation #1055

ba66e77 opened this issue Dec 16, 2016 · 4 comments
Labels

Comments

@ba66e77
Copy link

ba66e77 commented Dec 16, 2016

Issue Type

  • Bug Report / Support Request

Your Environment

Vagrant 1.8.6
VirtualBox 5.1.6r110634
ansible 2.2.0.0
  config file =
  configured module search path = Default w/o overrides

Your OS

  • macOS 10.12.1

Full console output

Curling path to test redirect

$ curl -I http://d8sandbox.local/install.php
HTTP/1.1 404 Not Found
Date: Fri, 16 Dec 2016 22:27:13 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Powered-By: PHP/7.0.14-2+deb.sury.org~xenial+1
Content-Type: text/html; charset=UTF-8

Curl path to test clean urls are working

$ curl -I http://d8sandbox.local/user/login
HTTP/1.1 200 OK
Date: Fri, 16 Dec 2016 22:30:52 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Powered-By: PHP/7.0.14-2+deb.sury.org~xenial+1
Cache-Control: must-revalidate, no-cache, private
X-Drupal-Dynamic-Cache: MISS
X-UA-Compatible: IE=edge
Content-language: en
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Expires: Sun, 19 Nov 1978 05:00:00 GMT
X-Generator: Drupal 8 (https://www.drupal.org)
X-Drupal-Cache: MISS
Content-Type: text/html; charset=UTF-8

Verify mod_rewrite is loaded in apache

vagrant@d8sandbox:~$ apache2ctl -M
AH00112: Warning: DocumentRoot [/usr/share/php/xhprof_html] does not exist
Loaded Modules:
...
 rewrite_module (shared)
...

Summary

On a clean installation of DrupalVM, I'm seeing mod_rewrite redirects set by Drupal core not working as expected. In .htaccess, Drupal 8 includes a redirect rule to reroute /install.php to /core/install.php. As you can see from the above, .htaccess redirects (as an example) are not working even though clean URLs are working and mod_rewrite is loaded in the VM.

@thom8
Copy link
Collaborator

thom8 commented Dec 16, 2016

See #945 (comment)

@ba66e77
Copy link
Author

ba66e77 commented Dec 17, 2016

Thanks for the tip, @thom8. That does seem to be the culprit. However, the solution you listed in that comment doesn't seem to work. When replacing the ProxyPassMatch as you suggested, php is printed to the screen rather than executed, so my home page displays:

handle($request); $response->send(); $kernel->terminate($request, $response); 

@geerlingguy, now that we're running Apache 2.4, is the ProxyPassMatch still needed? In the thread thom8 referenced you said it had been necessary to work in Apache 2.2 and subsequent upgrades would obviate it.

It looks to me like this is blocking not just the ability of drupal to see that clean urls are enabled, but also blocking any redirects from happening at the .htaccess level.

@geerlingguy
Copy link
Owner

@ba66e77 - I'm thinking we are safe to move on at this point. If we have issues with Ubuntu 12.04 and/or CentOS 6, then the solution IMO would be to make sure Apache 2.4 gets installed instead of trying to continue 2.2 support.

I'm willing to make that breaking change in my upstream role...

@oxyc
Copy link
Collaborator

oxyc commented Dec 29, 2016

Fixed in #1086.

@oxyc oxyc closed this as completed Dec 29, 2016
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