Skip to content

enable rewrite_module in apache#6

Merged
lmakarov merged 1 commit into
docksal:masterfrom
fjmk:master
Aug 4, 2017
Merged

enable rewrite_module in apache#6
lmakarov merged 1 commit into
docksal:masterfrom
fjmk:master

Conversation

@fjmk

@fjmk fjmk commented Aug 4, 2017

Copy link
Copy Markdown
Contributor

Upgraded to Docksal version 1.4 and using the new docksal/web:2.0-apache2.4 image.
Problem was that I couldn't login in my website under drupal7.docksal/user, but drupal7.docksal/?q=user worked.

Reason: the rewrite_module for apache was not enabled, after enabling it, I could login under /user.

@lmakarov

lmakarov commented Aug 4, 2017

Copy link
Copy Markdown
Member

Oh wow... thanks for reporting this!

Apparently, the upstream httpd images have a discrepancy in the configuration:

$ docker run --rm httpd:2.2-alpine cat /usr/local/apache2/conf/httpd.conf | grep rewrite
LoadModule rewrite_module modules/mod_rewrite.so

$ docker run --rm httpd:2.4-alpine cat /usr/local/apache2/conf/httpd.conf | grep rewrite
#LoadModule rewrite_module modules/mod_rewrite.so

mod_rewrite is enabled by default in Apache2.2, but not in Apache2.4.

I'm now inclined to package a full httpd.conf in our images, rather than just patching the stock config. Or even add automated tests to avoid situations like this down the road.

Also, I'm quite puzzled that Drupal 8 (which was used for testing here) does manage to work just fine without mod_rewrite enabled. Even Drupal 7 does work, but not with POST requests. This could be due to the differences in the fcgi proxy configuration between 2.2 and 2.4.

Going to accept the PR and roll-out a hotfix release. Thanks again!

@lmakarov lmakarov merged commit 66b7034 into docksal:master Aug 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants