Apache fails to restart

I installed Foreman (via the all-in-one installer) on a 64-bit Ubuntu
12.04 LTS
. During the install, I noticed some errors:

err: /Stage[main]/Apache::Config/Exec[enable-version]/returns: change from
> notrun to 0 failed: /usr/sbin/a2enmod version returned 1 instead of one of
> [0] at /usr/share/foreman-installer/apache/manifests/config.pp:45

err: /Stage[main]/Apache::Ssl/Exec[enable-ssl]/returns: change from notrun
> to 0 failed: /usr/sbin/a2enmod ssl returned 1 instead of one of [0] at
> /usr/share/foreman-installer/apache/manifests/ssl.pp:11

err: /Stage[main]/Passenger::Install::Debian/Exec[enable-headers]/returns:
> change from notrun to 0 failed: /usr/sbin/a2enmod headers returned 1
> instead of one of [0] at
> /usr/share/foreman-installer/passenger/manifests/install/debian.pp:16

notice: /Stage[main]/Apache::Service/Service[apache2]: Dependency
> Exec[enable-version] has failures: true

notice: /Stage[main]/Apache::Service/Service[apache2]: Dependency
> Exec[enable-ssl] has failures: true

notice: /Stage[main]/Apache::Service/Service[apache2]: Dependency
> Exec[enable-headers] has failures: true

warning: /Stage[main]/Apache::Service/Service[apache2]: Skipping because of
> failed dependencies

In trying to troubleshoot the failures, I installed some additional apache2
packages from the Ubuntu repo. Unfortunately, when I attempt to restart
apache, the follow error pops up:

Syntax error on line 15 of /etc/apache2/conf.d/foreman.conf:

Invalid command '<IfVersion', perhaps misspelled or defined by a module not
> included in the server configuration

Action 'configtest' failed.

The Apache error log may have more information.

…fail!

I've copied the contents of /etc/apache2/conf.d/foreman.conf, here:
http://pastie.org/8224840

Any thoughts on what is wrong and/or how to fix this? Thanks! -Pablo

> I installed Foreman (via the all-in-one installer) on a 64-bit Ubuntu
> 12.04 LTS
. During the install, I noticed some errors:
>
> err: /Stage[main]/Apache::Config/Exec[enable-version]/returns:
> change from notrun to 0 failed: /usr/sbin/a2enmod version
> returned 1 instead of one of [0] at
> /usr/share/foreman-installer/apache/manifests/config.pp:45

This is the cause of the later error restarting Apache. It doesn't
recognise the <IfVersion …> statement in the config file because the
"version" module isn't enabled.

Try running "a2enmod version" at a prompt - what happens? It should
enable and create the file /etc/apache2/mods-enabled/version.load.

[…]
> In trying to troubleshoot the failures, I installed some additional
> apache2 packages from the Ubuntu repo. Unfortunately, when I attempt to
> restart apache, the follow error pops up:
>
> Syntax error on line 15 of /etc/apache2/conf.d/foreman.conf:
>
> Invalid command '<IfVersion', perhaps misspelled or defined by a
> module not included in the server configuration

This indicates you're missing Apache's mod_version module.

··· On 10/08/13 18:07, Pablo Carranza wrote:


Dominic Cleal
Red Hat Engineering

Version as a module? Is that an April fool from httpd devs? :smiley:

··· On Mon, Aug 12, 2013 at 08:54:08AM +0100, Dominic Cleal wrote: > This is the cause of the later error restarting Apache. It doesn't > recognise the statement in the config file because the > "version" module isn't enabled.


Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman