SUSE Support

Here When You Need Us

apache2 does not start after in place upgrade from SLES 11 SP4 to SLES 12 SP3

This document (7023524) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 12 Service Pack 3 (SLES 12 SP3)
SUSE Linux Enterprise Server 12 Service Pack 2 (SLES 12 SP2)
SUSE Linux Enterprise Server 12 Service Pack 1 (SLES 12 SP1)

Situation

After upgrade from SLES 11 SP4 to SLES 12 SP3 apache2 may not start because of two possible issues.

Resolution

First issue:

webserver:/etc/apache2 # systemctl status apache2.service
? apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2018-11-15 13:02:16 CET; 22s ago
  Process: 3990 ExecStop=/usr/sbin/start_apache2 -DSYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=1/FAILURE)
  Process: 3981 ExecStart=/usr/sbin/start_apache2 -DSYSTEMD -DFOREGROUND -k start (code=exited, status=1/FAILURE)
 Main PID: 3981 (code=exited, status=1/FAILURE)

Nov 15 13:02:16 webserver systemd[1]: Starting The Apache Webserver...
Nov 15 13:02:16 webserver start_apache2[3981]: httpd-prefork: Syntax error on line 204 of /etc/apache2/httpd.conf: Syntax error on line 106 of /etc/apache2/default-server.c...f required)
Nov 15 13:02:16 webserver systemd[1]: apache2.service: Main process exited, code=exited, status=1/FAILURE
Nov 15 13:02:16 webserver start_apache2[3990]: httpd-prefork: Syntax error on line 204 of /etc/apache2/httpd.conf: Syntax error on line 106 of /etc/apache2/default-server.c...f required)
Nov 15 13:02:16 webserver systemd[1]: apache2.service: Control process exited, code=exited status=1
Nov 15 13:02:16 webserver systemd[1]: Failed to start The Apache Webserver.
Nov 15 13:02:16 webserver systemd[1]: apache2.service: Unit entered failed state.
Nov 15 13:02:16 webserver systemd[1]: apache2.service: Failed with result 'exit-code'.
Hint: Some lines were ellipsized, use -l to show in full.


Which can be solved by editing /etc/apache2/default-server.conf and change the line saying:

Include /etc/apache2/conf.d/apache2-manual?conf to IncludeOptional /etc/apache2/conf.d/apache2-manual?conf
See /etc/apache2/default-server.conf.rpmnew to compare with.


Second Issue:

When starting apache2 after the above change, the following issue may be seen:

webserver:/etc/apache2 # systemctl status apache2.service
? apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2018-11-15 13:03:50 CET; 2s ago
  Process: 4017 ExecStop=/usr/sbin/start_apache2 -DSYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=1/FAILURE)
  Process: 4007 ExecStart=/usr/sbin/start_apache2 -DSYSTEMD -DFOREGROUND -k start (code=exited, status=1/FAILURE)
 Main PID: 4007 (code=exited, status=1/FAILURE)

Nov 15 13:03:50 webserver systemd[1]: Starting The Apache Webserver...
Nov 15 13:03:50 webserver start_apache2[4007]: AH00526: Syntax error on line 28 of /etc/apache2/default-server.conf:
Nov 15 13:03:50 webserver start_apache2[4007]: Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration
Nov 15 13:03:50 webserver systemd[1]: apache2.service: Main process exited, code=exited, status=1/FAILURE
Nov 15 13:03:50 webserver start_apache2[4017]: AH00526: Syntax error on line 28 of /etc/apache2/default-server.conf:
Nov 15 13:03:50 webserver start_apache2[4017]: Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration
Nov 15 13:03:50 webserver systemd[1]: apache2.service: Control process exited, code=exited status=1
Nov 15 13:03:50 webserver systemd[1]: Failed to start The Apache Webserver.
Nov 15 13:03:50 webserver systemd[1]: apache2.service: Unit entered failed state.
Nov 15 13:03:50 webserver systemd[1]: apache2.service: Failed with result 'exit-code'.


The Second issue is described in https://www.suse.com/releasenotes/x86_64/SUSE-SLES/12/ saying:

8.3.4 Apache 2.4

With Apache 2.4, some changes have been introduced that affect Apache's access control scheme. Previously, the directives "Allow", "Deny", and "Order" have determined if access to a resource has been granted with Apache 2.2.
With 2.4, these directives have been replaced by the "Require" directive.
For backwards compatibility of 2.2 configurations, the SUSE Linux Enterprise Server 12 apache2 package understands both schemes, Deny/Allow (apache 2.2) and Require (apache 2.4).

For more information on how to easily switch between the two schemes, see the file /usr/share/doc/packages/apache2/README-access_compat.txt.
From /usr/share/doc/packages/apache2/README-access_compat.txt it says that running "a2enmod access_compat" is the solution.

After running a2enmod access_compat apache does start.

webserver:/etc/apache2 # systemctl status apache2.service
? apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; disabled; vendor preset: disabled)
   Active: active (running) since Thu 2018-11-15 13:04:21 CET; 1s ago
  Process: 4017 ExecStop=/usr/sbin/start_apache2 -DSYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=1/FAILURE)
 Main PID: 4041 (httpd-prefork)
   Status: "Processing requests..."
    Tasks: 6
   CGroup: /system.slice/apache2.service
           +-4041 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d//loadmodule.conf -C Include /etc/apache2/sysconfig.d//global.conf -...
           +-4050 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d//loadmodule.conf -C Include /etc/apache2/sysconfig.d//global.conf -...
           +-4051 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d//loadmodule.conf -C Include /etc/apache2/sysconfig.d//global.conf -...
           +-4052 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d//loadmodule.conf -C Include /etc/apache2/sysconfig.d//global.conf -...
           +-4053 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d//loadmodule.conf -C Include /etc/apache2/sysconfig.d//global.conf -...
           +-4054 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d//loadmodule.conf -C Include /etc/apache2/sysconfig.d//global.conf -...

Nov 15 13:04:21 webserver systemd[1]: Starting The Apache Webserver...
Nov 15 13:04:21 webserver systemd[1]: Started The Apache Webserver.

Cause

When /etc/apache2/default-server.conf is customized, the file will not be touched by the upgrade process.
With that no adjustments will be made.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7023524
  • Creation Date: 15-Nov-2018
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.