joomlatools / joomlatools-vagrant

Vagrant box for Joomla development.
https://www.joomlatools.com/developer/tools/vagrant/
Mozilla Public License 2.0
141 stars 37 forks source link

Merge feature/146-http2 #147

Closed stevenrombauts closed 5 years ago

stevenrombauts commented 5 years ago

Closes #146

stevenrombauts commented 5 years ago

@yiendos Would you mind giving this a whirl please? You can verify the vhosts are working correctly by making sure these commands return the correct HTTP version (2):

# Apache
curl --http2 -sI -k https://joomla.box/ -o/dev/null -w '%{http_version}\n'

# Nginx
curl --http2 -sI -k https://joomla.box:8443/ -o/dev/null -w '%{http_version}\n'
yiendos commented 5 years ago

@stevenrombauts i've pulled down the latest apache2 module via librarian-puppet install after clearing out the puppet/.librarian cache files. The modules seemed good and versioned. However if I attempt to provision the server:

==> default: Info: Concat[10-phpmyadmin.joomla.box.conf]: Scheduling refresh of Class[Apache::Service]
==> default: Notice: /Stage[main]/Profiles::Phpmyadmin/Apache::Vhost[phpmyadmin.joomla.box]/File[10-phpmyadmin.joomla.box.conf symlink]/ensure: created
==> default: Info: /Stage[main]/Profiles::Phpmyadmin/Apache::Vhost[phpmyadmin.joomla.box]/File[10-phpmyadmin.joomla.box.conf symlink]: Scheduling refresh of Class[Apache::Service]
==> default: Notice: /Stage[main]/Profiles::Box/Apache::Vhost[joomla.box-http]/Concat[00-joomla.box-http.conf]/File[/etc/apache2/sites-available/00-joomla.box-http.conf]/ensure: defined content as '{md5}7078efee8b1650ba7e4922b1e63b133b'
==> default: Info: Concat[00-joomla.box-http.conf]: Scheduling refresh of Class[Apache::Service]
==> default: Notice: /Stage[main]/Profiles::Box/Apache::Vhost[joomla.box-http]/File[00-joomla.box-http.conf symlink]/ensure: created
==> default: Info: /Stage[main]/Profiles::Box/Apache::Vhost[joomla.box-http]/File[00-joomla.box-http.conf symlink]: Scheduling refresh of Class[Apache::Service]
==> default: Notice: /Stage[main]/Profiles::Box/Apache::Vhost[joomla.box-ssl]/Concat[00-joomla.box-ssl.conf]/File[/etc/apache2/sites-available/00-joomla.box-ssl.conf]/ensure: defined content as '{md5}74acff3e11ca1f97dc00fb35c9797785'
==> default: Info: Concat[00-joomla.box-ssl.conf]: Scheduling refresh of Class[Apache::Service]
==> default: Notice: /Stage[main]/Profiles::Box/Apache::Vhost[joomla.box-ssl]/File[00-joomla.box-ssl.conf symlink]/ensure: created
==> default: Info: /Stage[main]/Profiles::Box/Apache::Vhost[joomla.box-ssl]/File[00-joomla.box-ssl.conf symlink]: Scheduling refresh of Class[Apache::Service]
==> default: Info: Class[Apache::Service]: Scheduling refresh of Service[httpd]

/**
* 
*  START OF ERRORS
*
**/

==> default: Error: /Stage[main]/Apache::Service/Service[httpd]: Failed to call refresh: Systemd restart for apache2 failed!
==> default: journalctl log for apache2:
==> default: -- Logs begin at Tue 2019-06-04 11:57:39 UTC, end at Tue 2019-06-04 12:10:33 UTC. --
==> default: Jun 04 12:10:31 joomlatools systemd[1]: Stopping The Apache HTTP Server...
==> default: Jun 04 12:10:31 joomlatools apachectl[22591]: AH00534: apache2: Configuration error: More than one MPM loaded.
==> default: Jun 04 12:10:31 joomlatools apachectl[22591]: Action 'stop' failed.
==> default: Jun 04 12:10:31 joomlatools apachectl[22591]: The Apache error log may have more information.
==> default: Jun 04 12:10:31 joomlatools systemd[1]: apache2.service: Control process exited, code=exited status=1
==> default: Jun 04 12:10:33 joomlatools systemd[1]: apache2.service: Failed with result 'exit-code'.
==> default: Jun 04 12:10:33 joomlatools systemd[1]: Stopped The Apache HTTP Server.
==> default: Jun 04 12:10:33 joomlatools systemd[1]: Starting The Apache HTTP Server...
==> default: Jun 04 12:10:33 joomlatools apachectl[22596]: AH00534: apache2: Configuration error: More than one MPM loaded.
==> default: Jun 04 12:10:33 joomlatools apachectl[22596]: Action 'start' failed.
==> default: Jun 04 12:10:33 joomlatools apachectl[22596]: The Apache error log may have more information.
==> default: Jun 04 12:10:33 joomlatools systemd[1]: apache2.service: Control process exited, code=exited status=1
==> default: Jun 04 12:10:33 joomlatools systemd[1]: apache2.service: Failed with result 'exit-code'.
==> default: Jun 04 12:10:33 joomlatools systemd[1]: Failed to start The Apache HTTP Server.
==> default: 
==> default: Error: /Stage[main]/Apache::Service/Service[httpd]: Systemd restart for apache2 failed!
==> default: journalctl log for apache2:
==> default: -- Logs begin at Tue 2019-06-04 11:57:39 UTC, end at Tue 2019-06-04 12:10:33 UTC. --
==> default: Jun 04 12:10:31 joomlatools systemd[1]: Stopping The Apache HTTP Server...
==> default: Jun 04 12:10:31 joomlatools apachectl[22591]: AH00534: apache2: Configuration error: More than one MPM loaded.
==> default: Jun 04 12:10:31 joomlatools apachectl[22591]: Action 'stop' failed.
==> default: Jun 04 12:10:31 joomlatools apachectl[22591]: The Apache error log may have more information.
==> default: Jun 04 12:10:31 joomlatools systemd[1]: apache2.service: Control process exited, code=exited status=1
==> default: Jun 04 12:10:33 joomlatools systemd[1]: apache2.service: Failed with result 'exit-code'.
==> default: Jun 04 12:10:33 joomlatools systemd[1]: Stopped The Apache HTTP Server.
==> default: Jun 04 12:10:33 joomlatools systemd[1]: Starting The Apache HTTP Server...
==> default: Jun 04 12:10:33 joomlatools apachectl[22596]: AH00534: apache2: Configuration error: More than one MPM loaded.
==> default: Jun 04 12:10:33 joomlatools apachectl[22596]: Action 'start' failed.
==> default: Jun 04 12:10:33 joomlatools apachectl[22596]: The Apache error log may have more information.
==> default: Jun 04 12:10:33 joomlatools systemd[1]: apache2.service: Control process exited, code=exited status=1
==> default: Jun 04 12:10:33 joomlatools systemd[1]: apache2.service: Failed with result 'exit-code'.
==> default: Jun 04 12:10:33 joomlatools systemd[1]: Failed to start The Apache HTTP Server.
==> default: 
==> default: Notice: /Stage[main]/Profiles::Varnish/Service[varnish]: Dependency Service[httpd] has failures: true
==> default: Info: /Stage[main]/Profiles::Varnish/Service[varnish]: Unscheduling all events on Service[varnish]
==> default: Info: Class[Profiles::Varnish]: Unscheduling all events on Class[Profiles::Varnish]
==> default: Warning: /Stage[main]/Profiles::Varnish/Service[varnish]: Skipping because of failed dependencies
==> default: Info: Stage[main]: Unscheduling all events on Stage[main]
==> default: Notice: Applied catalog in 23.21 seconds
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

If I revert the change here: https://github.com/joomlatools/joomlatools-vagrant/pull/147/files#diff-7ad79c32517d90544d1111a7a52c179cL23

The provision seems to run through without a hitch... perhaps we could install apache in the traditional way, then create two additional puppet commands to deal with the enabling and disabling of the two modules:

If yes, disable it with `sudo a2dismod prefork` and replace by worker `sudo a2enmod worker`
stevenrombauts commented 5 years ago

@yiendos Right, because you already had the prefork MPM module installed this fails. I removed that manually while writing these changes out. So you need to remove it with sudo a2dismod prefork. Provisioning should work fine then?

stevenrombauts commented 5 years ago

@yiendos My bad, I didn't realise this would fail when building from scratch. I've set the MPM module to event again, which seems to be the default now (when installing the package) so this should work again when building a new box.

stevenrombauts commented 5 years ago

@yiendos Great, thanks! Good thing you caught the MPM issue :)