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

Invalid command 'ProxyPassMatch' #379

Closed
robdecker opened this issue Jan 15, 2016 · 20 comments
Closed

Invalid command 'ProxyPassMatch' #379

robdecker opened this issue Jan 15, 2016 · 20 comments
Labels

Comments

@robdecker
Copy link

During a new build, I get the following error:

NOTIFIED: [geerlingguy.apache | restart apache] *******************************
failed: [ddvm] => {"failed": true}
msg: Output of config test was:
AH00526: Syntax error on line 14 of /etc/apache2/sites-enabled/vhosts.conf:
Invalid command 'ProxyPassMatch', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.


FATAL: all hosts have already failed -- aborting

The relevant portion from config.yml:

apache_vhosts:
  - servername: "thesite.dev"
    serveralias: "www.thesite.dev"
    documentroot: "/var/www/thesite"
    extra_parameters: |
          ProxyPassMatch ^/(.*\.php(/.*)?)$ "fcgi://127.0.0.1:9000/var/www/thesite"
@geerlingguy
Copy link
Owner

If you're running from master and have Ansible installed locally, make sure you have force updated all the Ansible Galaxy roles using the command in the README.

@robdecker
Copy link
Author

I have updated Ansible using $ sudo ansible-galaxy install -r provisioning/requirements.yml --force and have updated the box as well. Could the serveralias be the issue?

@geerlingguy
Copy link
Owner

It shouldn't be; what OS are you using?

-Jeff Geerling

On Jan 15, 2016, at 1:07 PM, Rob Decker notifications@github.com wrote:

I have updated Ansible using $ sudo ansible-galaxy install -r provisioning/requirements.yml --force and have updated the box as well. Could the serveralias be the issue?


Reply to this email directly or view it on GitHub.

@robdecker
Copy link
Author

Host OS is OS X 10.11.2 and the vagrant box is geerlingguy/ubuntu1404

@robdecker
Copy link
Author

And no, serveralias does not affect the error above.

@geerlingguy
Copy link
Owner

Can you do a diff of your config.yml vs example.config.yml and see if there might be some other parameter missing? I'm going to re-test everything on a separate OSX Install.

@robdecker
Copy link
Author

Never mind. Re-downloaded the repo and all is well.

@geerlingguy
Copy link
Owner

Nice! Glad you could get it working.

@ptsimard
Copy link

I have the exact same problem.

TASK [geerlingguy.apache : Ensure Apache has selected state and enabled on boot.] ***
fatal: [drupalvm]: FAILED! => {"changed": false, "failed": true, "msg": "Output of config test was:\nAH00526: Syntax error on line 13 of /etc/apache2/sites-enabled/vhosts.conf:\nInvalid command 'ProxyPassMatch', perhaps misspelled or defined by a module not included in the server configuration\nAction 'configtest' failed.\nThe Apache error log may have more information.\n"}

PLAY RECAP *********************************************************************
drupalvm                   : ok=29   changed=1    unreachable=0    failed=1
apache_vhosts:

  - servername: "drupalvm.dev"
    documentroot: "/var/www/drupalvm/drupal"
    extra_parameters: |
          ProxyPassMatch ^/(.*\.php(/.*)?)$ "fcgi://127.0.0.1:9000/var/www/drupalvm/drupal"

start rant:

I'm really struggling getting drupal-vm to run correctly after VDD decided to bomb on me. drupal-vm seemed like the logical choice but it's been a huge pain to get it to work.

  • I'm on Windows 10 with latest vagrant 1.8.1 (that I had to patch manually following random github issues to get it to even run.)
  • After hours of figuring winnfs I found a github issue about adding mount_options: ['vers=3'] to the config file, that worked
  • and now this... I'm stumped.

/rant

@oxyc
Copy link
Collaborator

oxyc commented Jan 29, 2016

@ptsimard another issue with the same error message is #394 (comment). Do you have the lines in playbook.yml and requirements.yml mentioned?

@geerlingguy
Copy link
Owner

@ptsimard - Believe me, I know your pain... the problem here is that Windows 7... to 8... to 10—every release had a HUGE number of breaking changes that broke parts of VirtualBox... parts of Vagrant... etc. On the Mac, and on most Linux distros, it has been effortless to support 10.7, 8, 9, 10, 11, Fedora 20, 21, 22, 23, Ubuntu 14, 15, (soon) 16, Arch, etc.

The problem is Windows is currently somewhat a second class citizen in many different ways—I think Drupal VM is one of the very few VM projects that is fully tested on a Windows 10 laptop (and Fedora, Ubuntu, Mac OS X) before every single release.

And in this case, the release (2.2.0) worked flawlessly. Then Ansible 2.0.0 was released, and Vagrant had a bug that made it's new (in 1.8.0) ansible_local provisioner start breaking. So now I'm (im)patiently awaiting Vagrant's 1.8.2 release, because most people don't have the time/inclination to patch Vagrant on Windows or install the dev version (instead of 1.8.1, which is broken).

Anyways... long story short, this is a well known bug, and the fix in this case—does your provisioning/playbook.yml contain the following line?

  - { role: geerlingguy.apache-php-fpm, when: drupalvm_webserver == 'apache' }

Also, are you updated to the latest release of Drupal VM (e.g. master), or are you on 2.2.0?

@ptsimard
Copy link

Hey tanks for the fast reply!

Yes I have that line and I am running the master from 2 days ago (what the main download button on drupalvm.com is pointing to).

So I'm actually using the vm right now but I don't know what might be broken since the provisioning does not complete.

@geerlingguy
Copy link
Owner

@ptsimard - At what point does provisioning fail - can you copy out the error message(s) or screenshot it at the point where it fails?

@ptsimard
Copy link

TASK [geerlingguy.apache : Add vhost symlink in sites-enabled.] ****************
ok: [drupalvm]

TASK [geerlingguy.apache : Remove default vhost in sites-enabled.] *************
ok: [drupalvm]

TASK [geerlingguy.apache : Ensure Apache has selected state and enabled on boot.] ***
fatal: [drupalvm]: FAILED! => {"changed": false, "failed": true, "msg": "Output of config test was:\nAH00112: Warning: DocumentRoot [/var/www/drupalvm/shared] does not exist\nAH00526: Syntax error on line 13 of /etc/apache2/sites-enabled/vhosts.conf:\nInvalid command 'ProxyPassMatch', perhaps misspelled or defined by a module not included in the server configuration\nAction 'configtest' failed.\nThe Apache error log may have more information.\n"}

PLAY RECAP *********************************************************************
drupalvm                   : ok=29   changed=0    unreachable=0    failed=1

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

it returns to command prompt there

@geerlingguy
Copy link
Owner

@ptsimard - Ah... in this case, the problem is that the next role (which would actually install the proper apache mod) isn't being run. Two options:

  1. vagrant destroy to delete the VM then vagrant up from scratch.
  2. Add two more items to the apache_mods_enabled list in config.yml and then vagrant provision again (so it would read like below).
apache_mods_enabled:
  - expires.load
  - ssl.load
  - rewrite.load
  - proxy.load
  - proxy_fcgi.load

@ptsimard
Copy link

Tried option 2:

it stopped there:

TASK [geerlingguy.composer : include] ******************************************
skipping: [drupalvm]

TASK [geerlingguy.drush : Clone Drush from GitHub.] ****************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: 'in <string>' requires string as left operand, not int
fatal: [drupalvm]: FAILED! => {"changed": false, "failed": true, "parsed": false}

RUNNING HANDLER [geerlingguy.apache : restart apache] **************************

RUNNING HANDLER [geerlingguy.php : restart webserver] **************************

PLAY RECAP *********************************************************************
drupalvm                   : ok=109  changed=8    unreachable=0    failed=1

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

@geerlingguy
Copy link
Owner

Uh... TypeError: 'in <string>' requires string as left operand, not int

I've not seen that one before, though it indicates Python is trying to perform an operation with an expected string, but an integer was used instead. Do you have drush_version set to master in your config.yml? Are these settings the same?

drush_version: master
drush_keep_updated: true

@ptsimard
Copy link

oh I had that set to 7. made it master now, will see

@ptsimard
Copy link

it completed! so if I wanted drush to be 7 it needs to be quoted?

PLAY RECAP *********************************************************************
drupalvm                   : ok=191  changed=15   unreachable=0    failed=0

Thanks for the debugging!

@geerlingguy
Copy link
Owner

Yeah; that's not entirely intuitive—it refers to a git branch name, tag, or commit hash, so it should be a string.

oxyc added a commit to oxyc/drupal-vm that referenced this issue Jan 29, 2016
geerlingguy added a commit that referenced this issue Jan 29, 2016
Helps with #379: Set drush_version explicitly to a string
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