Article ID: 128351, created on Feb 16, 2016, last review on Feb 16, 2016

  • Applies to:
  • Virtuozzo
  • Virtuozzo containers for Linux
  • Virtuozzo hypervisor

Symptoms

apache2 service startup might fail after phpPgAdmin installation on OpenSUSE.

Service status is failed with exit code 1:

pvo-suse-13-1:~ # service apache2 status
apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled)
   Active: failed (Result: exit-code) since Tue 2016-02-16 15:49:00 UTC; 3s ago
  Process: 2632 ExecStop=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=1/FAILURE)
  Process: 2614 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k start (code=exited, status=1/FAILURE)
 Main PID: 2614 (code=exited, status=1/FAILURE)

Meanwhile journalctl reports following messages logged on apache startup:

pvo-suse-13-1:~ # journalctl -xn
...
Feb 16 15:49:00 pvo-suse-13-1 start_apache2[2593]: AH00526: Syntax error on line 15 of /etc/apache2/conf.d/phpPgAdmin.conf:
Feb 16 15:49:00 pvo-suse-13-1 start_apache2[2593]: Invalid command '<IfVersion', perhaps misspelled or defined by a module not included in the server configuration
Feb 16 15:49:00 pvo-suse-13-1 start_apache2[2614]: AH00526: Syntax error on line 15 of /etc/apache2/conf.d/phpPgAdmin.conf:
Feb 16 15:49:00 pvo-suse-13-1 start_apache2[2614]: Invalid command '<IfVersion', perhaps misspelled or defined by a module not included in the server configuration
Feb 16 15:49:00 pvo-suse-13-1 start_apache2[2632]: AH00526: Syntax error on line 15 of /etc/apache2/conf.d/phpPgAdmin.conf:
Feb 16 15:49:00 pvo-suse-13-1 start_apache2[2632]: Invalid command '<IfVersion', perhaps misspelled or defined by a module not included in the server configuration

Cause

Configuration directive IfVersion cannot be parsed which leads to the failure. mod_version must be loaded to parse IfVersion.

This issue is considered to be an OpenSUSE bug - mod_version is not loaded on startup due to apache configuration shipped from OpenSUSE.

Resolution

To resolve the issue it's necessary to make sure mod_version is loaded upon apache2 startup.
To do this open configuration file /etc/sysconfig/apache2 with the text editor of your choice, find APACHE_MODULES directive and add version module to the list. E.g.:

pvo-suse-13-1:~ # grep ^APACHE_MODULES /etc/sysconfig/apache2 
APACHE_MODULES="actions alias auth_basic authn_file authz_host authz_groupfile authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl userdir reqtimeout authn_core authz_core"
pvo-suse-13-1:~ # vim  /etc/sysconfig/apache2 
pvo-suse-13-1:~ # grep ^APACHE_MODULES /etc/sysconfig/apache2 
APACHE_MODULES="actions alias auth_basic authn_file authz_host authz_groupfile authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl userdir reqtimeout authn_core authz_core version"
pvo-suse-13-1:~ # service apache2 restart
pvo-suse-13-1:~ # service apache2 status
apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled)
   Active: active (running) since Tue 2016-02-16 15:57:58 UTC; 2s ago
  Process: 2632 ExecStop=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=1/FAILURE)
 Main PID: 2696 (httpd2-prefork)
   Status: "Processing requests..."
   CGroup: /system.slice/apache2.service
           |-2696 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start
           `-2713 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start

0dd5b9380c7d4884d77587f3eb0fa8ef 2897d76d56d2010f4e3a28f864d69223 a26b38f94253cdfbf1028d72cf3a498b d02f9caf3e11b191a38179103495106f e8e50b42231236b82df27684e7ec0beb

Email subscription for changes to this article
Save as PDF